Ticket #542 (new defect)

Opened 18 months ago

Metadata properties with the same name cause problems

Reported by: forgacs Owned by:
Priority: major Milestone: MediaMosa X.X
Component: Core Version:
Keywords: Cc:
MoSCoW: Should Have Estimated time after impact analysis:
Related to project: none Tested: no
Accepted: no Estimated Hours: 0

Description

If two or more client applications creates metadata properties (REST: metadata_tag/create [POST]) using the same name, then it causes different problems. Like the MediaMosa asset browse page won't show the asset any more, but shows lots of notices and warnings like:
"Notice: Undefined index: assets in mediamosa_asset::enrich_response_asset() (line 777 of /home/pforgacs/src/mediamosa/sites/all/modules/mediamosa/core/asset/mediamosa_asset.class.inc)."

This is because the get_metadata_properties() function in sites/all/modules/mediamosa/core/asset/metadata/property/mediamosa_asset_metadata_property.class.inc file build the output using the property name as an array key.

foreach ($result as $row) {
  $metadata_properties[$key][$row['propdef_name']] = $row;
}

Fixing this means we have to fix it in all places where this function output is used.

MediaMosa 2.x and 3.x are involved in this bug.

Related to http://mediamosa.org/node/264188 .

Note: See TracTickets for help on using tickets.