Content (including categories) not showing on file redirects
OpenPublic

Description

Author: tomp2008

Description:
When adding any category to a redirect page in the File: namespace, the category name does not display in the page's bottom "Categories" box, although the page itself does get added to the category.

In the given example URL, the page is in [[Category:Test category]], and when you go to the category page "Category:Test category" it is there, but on the redirect page itself the category is not showing. ("Category:Test category" is a non-existent category but that doesn't matter, it's the same for any category).

To reproduce, simply: Go to any file redirect using [[Special:RandomRedirect/File]], and try adding a category to the page, either using Hotcat or by manually editing the page.

This was supposed to be fixed along with [[bugzilla:23851]] in the new 1.17 release but I guess it was overlooked.


Version: 1.17.x
Severity: minor
URL: http://en.wikipedia.org/w/index.php?title=File:Covernt1.jpg&redirect=no
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=23851

bzimport added a project: MediaWiki-Categories.Via ConduitNov 21 2014, 11:33 PM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz27857.
bzimport created this task.Via LegacyMar 5 2011, 12:17 AM
Bawolff added a comment.Via ConduitMar 5 2011, 2:48 AM

Created attachment 8247
patch to make article handle file redirects

Seems to be caused by ImagePage.php overriding Article.php without really any reason to. This patch seems to fix it, but I'm not sure whats really going on in Article.php or what consequences this might have or why code was duplicated between Article.php and ImagePage.php, so someone who knows whats going on should have a look.

Attached: ImagePageRedirect.diff

bzimport added a comment.Via ConduitApr 9 2012, 12:07 PM

rd232 wrote:

Renaming to clarify that the problem is not limited to categories: *no* content is displayed on file redirects.

bzimport added a comment.Via ConduitApr 9 2012, 12:13 PM

rd232 wrote:

Additional: one use for file redirects is to allow transclusion of an "always-up-to-date" link. Basically, individual files should be stable: File:African borders 2011.jpg should always show the 2011 borders, etc. If people want to transclude a "current African borders" file, that should be a redirect: File:current African borders.jpg, which can be redirected to whatever the current file is for that series, so in 2012 it can be changed to point to File:African borders 2012.jpg, etc.

Now, ideally, a template on the redirect would explain matters, but because file redirects don't show any non-redirect content that's not possible at the moment.

bzimport added a comment.Via ConduitMay 25 2012, 2:21 AM

sumanah wrote:

Brian, are you interested in submitting this into Gerrit?

Bawolff added a comment.Via ConduitJul 30 2012, 2:42 PM

(In reply to comment #4)

Brian, are you interested in submitting this into Gerrit?

Interesting, I did not recieve bug spam for this, and just happened to stumble upon this by accident.

Generally if I have a patch on a bug its because I think there's something wrong with my patch. I wrote this one over a year ago, so will have to re-look at it at some point.

jayvdb added a comment.Via ConduitMay 10 2014, 7:49 AM

As it has been a while, I have retested this, and it is still happening.

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.