Page MenuHomePhabricator

#REDIRECT [[A]] [[File:Filename.jpg]] incorrectly registers the redirect page as a file redirect to File:Filename.jpg in "File usage" section on [[File:Filename.jpg]]
Closed, ResolvedPublic

Details

Reference
bz50488

Event Timeline

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

Cannot reproduce on local wiki, can you fix your test case (choose another image or so)?

Still present - https://test2.wikipedia.org/wiki/File:Title_0.40766062783257595.png and https://test2.wikipedia.org/w/index.php?title=User:Bawolff/bug50488&redirect=no

The file redirect code seems to makes some bad assumptions that nothing else will be on redirect page (See for example the bug about categories not showing up on file redirect pages).

I assume that Liangent where redirect to the file page, when visit the page (or the file page is stored in the redirect table), but that is wrong, the redirect will you show the content of the first page. Auto summary also shows, that the correct redirect was extracted

It is more a feature, than a bug, that other content of a redirect page gets parsed and the tables gets it content. Wikipedia adds categories or person data to redirects. That extra content is not shown is another bug.

(In reply to comment #3)

It is more a feature, than a bug, that other content of a redirect page gets
parsed and the tables gets it content.

Yes, the bug is that when showing what pages the file is used in, it assumes that any page listed in the imagelinks table that is also a redirect must be a redirect to the current file.

(In reply to comment #4)

(In reply to comment #3)

It is more a feature, than a bug, that other content of a redirect page gets
parsed and the tables gets it content.

Yes, the bug is that when showing what pages the file is used in, it assumes
that any page listed in the imagelinks table that is also a redirect must be
a
redirect to the current file.

Updated summary to clarify the appearance.

ImagePage is using the page_is_redirect field of the page table to determine, if the page is a redirect, but when a file is used on a redirect, that is ambiguous, has to use the redirect table instead.

Change 85517 had a related patch set uploaded by Umherirrender:
Fix redirect detection on image page's "file usages" section

https://gerrit.wikimedia.org/r/85517

Change 85517 abandoned by Umherirrender:
Fix redirect detection on image page's "file usages" section

Reason:
Still no idea how to avoid a filesort here (see inline comment)

https://gerrit.wikimedia.org/r/85517

Change 105829 had a related patch set uploaded by Anomie:
Move redirect rendering into WikitextContent

https://gerrit.wikimedia.org/r/105829

Change 105829 merged by jenkins-bot:
Move redirect rendering into WikitextContent

https://gerrit.wikimedia.org/r/105829

Should be deployed to WMF wikis with 1.23wmf10, see https://www.mediawiki.org/wiki/MediaWiki_1.23/Roadmap for the schedule.