Last modified: 2014-09-23 23:13:28 UTC
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.
Created attachment 8247 [details] 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.
Renaming to clarify that the problem is not limited to categories: *no* content is displayed on file redirects.
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.
Brian, are you interested in submitting this into Gerrit?
(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.
As it has been a while, I have retested this, and it is still happening.