Skip to content

Undefined array key "componentParts" in MetadataUtils::isHiddenComponentPart() #163

@jschultze

Description

@jschultze

I have not yet fully understood the problem, and will create a pull request if I do. Until then, I just wanted to document it here.

When running the deduplication command, multiple errors of this kind appear in the logs:

PHP Warning:  Undefined array key "componentParts" in /opt/RecordManager/src/RecordManager/Base/Utils/MetadataUtils.php on line 1014
Warning: Undefined array key "componentParts" in /opt/RecordManager/src/RecordManager/Base/Utils/MetadataUtils.php on line 1014

PHP Warning:  Undefined array key "componentParts" in /opt/RecordManager/src/RecordManager/Base/Utils/MetadataUtils.php on line 1017
Warning: Undefined array key "componentParts" in /opt/RecordManager/src/RecordManager/Base/Utils/MetadataUtils.php on line 1017

PHP Warning:  Undefined array key "componentParts" in /opt/RecordManager/src/RecordManager/Base/Utils/MetadataUtils.php on line 1018
Warning: Undefined array key "componentParts" in /opt/RecordManager/src/RecordManager/Base/Utils/MetadataUtils.php on line 1018

The value for componentParts is not explicitly configured in datasources.ini. It should then be set to the default value "as_is" in initSourceSettings() of src/RecordManager/Base/Command/AbstractBase.php, but that does not seem to happen.

One solution would be to check for this array key in isHiddenComponentPart() of src/RecordManager/Base/Utils/MetadataUtils.php, but as far as I read the code, the default value should be set all right. So there might be an error lying underneath and such a direct check would not take that into consideration.

System: PHP 8.2.19 on Debian 11.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions