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).
cscott created this task.Sep 22 2014, 8:15 PM

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.

Tgr added a comment.Sep 23 2014, 1:29 PM

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 closed this task as Resolved.Nov 24 2014, 1:46 PM
Gilles claimed this task.
Gilles moved this task from Untriaged to Done on the Multimedia board.Dec 4 2014, 9:28 AM