Last modified: 2011-10-28 01:40:23 UTC
A direct view URL which uses the 'Media:' special namespace currently brings up the Image:/File: page transparently, however it doesn't redirect you to the canonical URL, the way that using a non-canonical form of the Image/File namespace does. To ensure links are pointed sensibly, an HTTP redirect should be issued here. eg: http://en.wikipedia.org/wiki/Media:Northern_Spotted_Owl.USFWS-thumb.jpg -> http://en.wikipedia.org/wiki/File:Northern_Spotted_Owl.USFWS-thumb.jpg
Done in r44972
r44972 isn't quite behaving transparently; non-view URLs are also being redirected to the raw view page, so for instance an ?action=edit or diff or whatever gets lost. See for example: http://en.wikipedia.org/wiki/Image:Wiki.png?action=edit http://en.wikipedia.org/wiki/Media:Wiki.png?action=edit these both currently behave just like: http://en.wikipedia.org/wiki/File:Wiki.png?action=edit while with this patch the Media: one would unexpectedly redirect to the view URL. The redirection should probably just be done where other existing normalization is... perhaps all that's actually needed is just to replace a Media: Title with the equivalent File: one when initializing the title in the first place, and the existing normalization-redirection will take care of it. Rolling it back for now in r44981.
(In reply to comment #2) > r44972 isn't quite behaving transparently; non-view URLs are also being > redirected to the raw view page, so for instance an ?action=edit or diff or > whatever gets lost. > > See for example: > http://en.wikipedia.org/wiki/Image:Wiki.png?action=edit > http://en.wikipedia.org/wiki/Media:Wiki.png?action=edit > > these both currently behave just like: > http://en.wikipedia.org/wiki/File:Wiki.png?action=edit > > while with this patch the Media: one would unexpectedly redirect to the view > URL. > > The redirection should probably just be done where other existing normalization > is... perhaps all that's actually needed is just to replace a Media: Title with > the equivalent File: one when initializing the title in the first place, and > the existing normalization-redirection will take care of it. > > Rolling it back for now in r44981. Probably not related to those two revs, but currently that NS_MEDIA link is shining in it's full glory as a MWException: http://en.wikipedia.org/wiki/Media:Wiki.png?action=edit MediaWiki internal error. Original exception: exception 'MWException' with message 'MWNamespace::getTalk does not make any sense for given namespace -2' in /usr/local/apache/common-local/php-1.18/includes/Namespace.php:40 Stack trace: (See attachment)
Created attachment 9203 [details] MWException on Media:-titles with a specified action
New in 1.18 afaik.