commonmetadata and extmetadata in imageinfo cannot handle deep arrays returned by File::getMetadata()
Open, NormalPublic

Description

The imageinfo/metadata API uses FormatMetadata::flattenArrayReal to handle metadata values which contain an array. commonmetadata and extmetadata don't use this and end up generating weird output.

Example:
http://commons.wikimedia.org/w/api.php?action=query&prop=imageinfo&format=jsonfm&iiprop=metadata|commonmetadata|extmetadata&iilimit=10&titles=File%3ABlack_Hawk_Down_Super64_over_Mogadishu_coast.jpg


Version: unspecified
Severity: normal

Details

Reference
bz72652
bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz72652.
bzimport added a subscriber: Unknown Object (MLST).
Tgr created this task.Oct 28 2014, 11:28 PM

gerritadmin wrote:

Change 170743 had a related patch set uploaded by Gilles:
Remove wrapper arrays coming from EXIF

https://gerrit.wikimedia.org/r/170743

gerritadmin wrote:

Change 172798 had a related patch set uploaded by Gergő Tisza:
FormatMetadata::fetchExtendedMetadata: Ignore multiple EXIF/XMP values

https://gerrit.wikimedia.org/r/172798

gerritadmin wrote:

Change 170743 abandoned by Gilles:
Remove wrapper arrays coming from EXIF

https://gerrit.wikimedia.org/r/170743

gerritadmin wrote:

Change 172798 merged by jenkins-bot:
FormatMetadata::fetchExtendedMetadata: Ignore multiple EXIF/XMP values

https://gerrit.wikimedia.org/r/172798

What's the status of this?

Anomie moved this task from Unsorted to Needs Code on the MediaWiki-API board.Feb 19 2015, 7:12 PM
Tgr added a comment.Feb 20 2015, 9:49 PM

extmetadata is fixed. I'll fix commonmetadata but need input from someone more familiar with it on how it should handle multiple values.

Tgr set Security to None.