Last modified: 2014-01-08 16:47:23 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 T29621, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27621 - File redirects are not showing up in API backlinks queries
File redirects are not showing up in API backlinks queries
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-21 22:15 UTC by carnildo
Modified: 2014-01-08 16:47 UTC (History)
8 users (show)

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


Attachments

Description carnildo 2011-02-21 22:15:36 UTC
Visit http://en.wikipedia.org/w/api.php?action=query&blfilterredir=redirects&bltitle=File:Elisa_-_Stay_single_cover.jpg&list=backlinks&blredirect=1

Expected result: The redirect from [[File:Elisacoversta.jpg]] to [[File:Elisa - Stay single cover.jpg]] will be listed.

Actual result: An empty list of backlinks.
Comment 1 db [inactive,noenotif] 2011-02-22 07:02:06 UTC
The imagelinks over redirects are not stored also by the target page, like templateredirects.

See also bug 23542
Comment 2 Sam Reed (reedy) 2011-06-06 13:07:43 UTC
http://192.168.0.190/wiki/Special:WhatLinksHere/File:Blah.png

View (previous 50 | next 50) (20 | 50 | 100 | 250 | 500)
Main Page (← links)
File:Bah.png (redirect page; image link) (← links)
Main Page (← links)

It's there in the GUI...
Comment 3 Sam Reed (reedy) 2011-06-06 13:13:02 UTC
http://192.168.0.190/wiki/Special:WhatLinksHere/File:Blah.png

View (previous 50 | next 50) (20 | 50 | 100 | 250 | 500)
Main Page (← links)
File:Bah.png (redirect page; image link) (← links)
Main Page (← links)

It's there in the GUI...
Comment 4 carnildo 2011-12-06 03:00:13 UTC
(In reply to comment #4)
> Fixed in r54567.
> 
> Please update and add explained comment.

That has absolutely nothing to do with this bug.
Comment 5 Brad Jorsch 2014-01-04 16:55:39 UTC
[[File:Elisacoversta.jpg]] doesn't *link* to [[File:Elisa - Stay single cover.jpg]] because the "link" in the redirect syntax is a file usage, not a link. And since backlinks only looks at links (specifically, the pagelinks table in the database), it won't find this. OTOH, https://en.wikipedia.org/w/api.php?action=query&iufilterredir=redirects&iutitle=File:Elisa_-_Stay_single_cover.jpg&list=imageusage&iuredirect=1 which looks at the imagelinks table does find it.

Special:WhatLinksHere uses the 'redirect' table to find redirects, and also checks imagelinks and templatelinks to generate its output.

Gerrit change #104764, which adds the ability to query the redirect table directly, will be a better way to find redirects if it gets merged.
Comment 6 Gerrit Notification Bot 2014-01-06 21:30:42 UTC
Change 105829 had a related patch set uploaded by Anomie:
Move redirect rendering into WikitextContent

https://gerrit.wikimedia.org/r/105829
Comment 7 Gerrit Notification Bot 2014-01-07 22:45:16 UTC
Change 105829 merged by jenkins-bot:
Move redirect rendering into WikitextContent

https://gerrit.wikimedia.org/r/105829
Comment 8 Brad Jorsch 2014-01-08 16:47:23 UTC
Should be deployed to WMF wikis with 1.23wmf10, see https://www.mediawiki.org/wiki/MediaWiki_1.23/Roadmap for the schedule.

This will, of course, depend on those pages linking to the redirect having a LinksUpdate job run (e.g. they need to be edited, or purged with forcelinkupdate, or the file redirect could be purged with forcerecursivelinkupdate). That will also stop the redirect itself from showing up in list=imageusage.

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


Navigation
Links