Page MenuHomePhabricator

Missing SVG image in parsoid: Bug in PHP imageinfo API?
Closed, ResolvedPublic

Description

The PHP expanded template generates on: https://en.wikipedia.org/wiki/Algeria

<tr>
<td align="center" style="width:58%; vertical-align:middle;">[[File:Flag of Algeria.svg|125px|border|alt=|Flag of Algeria]]</td>
<td align="center" style="width:auto;vertical-align:middle;">[[File:Algeria emb (1976).svg |85px |alt= |Emblem of Algeria]]</td>
</tr>

In Parsoid this SVG Emblem image is missing:
http://parsoid.wmflabs.org/enwiki/Algeria?oldid=582506391

The <td> that should contain it is empty.


Version: unspecified
Severity: normal

Details

Reference
bz57299

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:27 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz57299.

This might be related to that file having a different name on commons: https://en.wikipedia.org/wiki/File:Algeria_emb_(1976).svg is actually
https://commons.wikimedia.org/wiki/File:Seal_of_Algeria.svg

The image info returned from enwiki is not very helpful though:

{

"query": {
  "pages": {
    "-1": {
      "ns": 6,
      "title": "File:Algeria emb (1976).svg",
      "missing": "",
      "imagerepository": ""
    }
  }
}

}

For comparison, this is the info returned for [[File:Flag of Algeria.svg]], also from commons:

{

"query-continue": {
  "imageinfo": {
    "iistart": "2013-03-02T15:06:32Z"
  }
},
"query": {
  "pages": {
    "-1": {
      "ns": 6,
      "title": "File:Flag of Algeria.svg",
      "missing": "",
      "imagerepository": "shared",
      "imageinfo": [
        {
          "size": 954,
          "width": 900,
          "height": 600,
          "url": "http://upload.wikimedia.org/wikipedia/commons/7/77/Flag_of_Algeria.svg",
          "descriptionurl": "http://commons.wikimedia.org/wiki/File:Flag_of_Algeria.svg"
        }
      ]
    }
  }
}

}

This might actually be a bug in the PHP API.

Arlolra set Security to None.
tstarling claimed this task.
tstarling subscribed.

Works for me. The returned imageinfo is correct, it is not like the one Gabriel pasted. The HTML returned from a local Parsoid instance looks correct, and the image renders correctly in VE when editing the old revision. The image apparently hasn't changed -- it was a commons redirect since 2011, and it was never a local redirect. So I guess this was fixed at some point.