Last modified: 2013-11-15 03:52:41 UTC
r66724 added &redirects=true for bug 22541, but when a file page on a foreign wiki is redirecting to a non-file and used via ForeignAPIRepo, the redirect target's info is fetched so there won't be $data['query']['pages'][]['imageinfo'], causing a red file link. However, when the file is used directly on that foreign wiki, the redirect is ignored. ForeignAPIRepo should follow this behavior (ie. when a file is redirecting to a non-file, remove &redirects=true and try again).
It looks like the patch to address bug 23750 addresses this issue. This can probably be closed as a duplicate.
(In reply to comment #1) > It looks like the patch to address bug 23750 addresses this issue. This can > probably be closed as a duplicate. That change may get ForeignAPIRepo more confused. A query api.php?action=query&titles=File:GEDC0534.jpg&prop=imageinfo&redirects&format=jsonfm shows this now: { "query": { "redirects": [ { "from": "File:GEDC0534.jpg", "to": "Main Page" } ], "pages": { "12": { "pageid": 12, "ns": 0, "title": "Main Page", "imagerepository": "" }, "52": { "imagerepository": "local", "imageinfo": [ { "timestamp": "2013-01-23T08:18:55Z", "user": "Liangent" } ] } } } } Now it's difficult to find out what $data['query']['pages']['52'] is.
I'm not sure I follow. I did see that you updated the other bug that the change has been merged. Am I correct in believing that change will resolve this issue? The other bug is more or less identical to what this bug was originally created for - images from foreign API repos that redirect to non-image pages don't display correctly, due to the API not returning the URL of the actual image file if it redirects.