Last modified: 2013-11-15 03:52:41 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T44610, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 42610 - ForeignAPIRepo should ignore file redirects to non-file
ForeignAPIRepo should ignore file redirects to non-file
Status: NEW
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-01 19:49 UTC by Liangent
Modified: 2013-11-15 03:52 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Liangent 2012-12-01 19:49:08 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).
Comment 1 shifuimam 2013-01-25 23:12:19 UTC
It looks like the patch to address bug 23750 addresses this issue. This can probably be closed as a duplicate.
Comment 2 Liangent 2013-01-26 04:14:26 UTC
(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.
Comment 3 shifuimam 2013-01-26 17:40:33 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links