Page MenuHomePhabricator

Strange `{_: "..."}` in artist/credit
Closed, ResolvedPublic

Description

See:
https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&prop=imageinfo&format=json&iiprop=extmetadata&iilimit=10&titles=File%3ABlack_Hawk_Down_Super64_over_Mogadishu_coast.jpg

Several fields have _: "<some text>" as their value, instead of (as expected) a human-readable string. For example:

"ObjectName": {
  "value": {
    "_": "Sold 12 Nws "
  },
  "source": "file-metadata",
  "hidden": ""
},
"ImageDescription": {
  "value": {
    "_": "Michael Durant's helicopter over Mogadishu. Mike Goodale rode on this one."
  },
  "source": "file-metadata"
},
"Artist": {
  "value": {
    "_": "LABCOPY"
  },
  "source": "file-metadata"
},
"Credit": {
  "value": {
    "_": "INQ LABCOPY"
  },
  "source": "file-metadata",
  "hidden": ""
},

This is crashing the OCG bundler, which expects the value property to contain a human-readable string, not a JSON object.


Version: unspecified
Severity: normal

Details

Reference
bz71135

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:46 AM
bzimport added a project: CommonsMetadata.
bzimport set Reference to bz71135.
bzimport added a subscriber: Unknown Object (MLST).

We're fairly sure that this is happening because the file has an EXIF author and source, but no information template.

But I can't verify that because there are basically no other files like that.

I think this happens when the EXIF data contains a child XML tag where an attribute would be expected. The _ key is a quirk of the MediaWiki API when it encounters data which cannot be trivially converted from XML to JSON (or vice versa).

Gilles claimed this task.