Page MenuHomePhabricator

API returns duplicate upload information when a file has been redirected
Closed, ResolvedPublic

Description

Take a look at this URL: Let's run a query asking for both redirect and imageinfo in the same request. I've provided a query for two different images; the first one is just a control image. The second one has been moved (log: https://commons.wikimedia.org/w/index.php?title=Special:Log&page=File%3AQuatrefilsd%27Aymon1849-Maugis+vole+harlemagne.jpg).

Here is the query:
https://commons.wikimedia.org/w/api.php?action=query&titles=File%3ABiserica%20evanghelica%20din%20Zagar%20%2835%29.JPG|File%3AQuatrefilsd%27Aymon1849-Maugis%20vole%20harlemagne.jpg&prop=imageinfo&redirects=&iiprop=sha1|user

Notice that the page is returning 2 results for the image that was moved, whereas it should only be returning 1. The second result doesn't have the pageid, the ns, or the title.

This may not be a huge problem, because it is already returning the proper result above. However, my bot throws a fit when it sees an XML element with a title, because it thinks it's missing out on some data.

Thanks.


Version: 1.23.0
Severity: minor

Details

Reference
bz61815

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:05 AM
bzimport set Reference to bz61815.
bzimport added a subscriber: Unknown Object (MLST).

This appears to have been fixed at some point, as the link given is now returning only one result for the moved image.

Anomie set Security to None.