Page MenuHomePhabricator

Special:Filepath sometimes throws "MWException: SpecialFilepath doesn't redirect!"
Closed, ResolvedPublicPRODUCTION ERROR

Description

Spotted in production on commonswiki. Only happening to a couple of URLs:

Screenshotted because I was too lazy to copy+paste all these weird urls

Message

[{exception_id}] {exception_url}   MWException from line 112 of /srv/mediawiki/php-1.32.0-wmf.15/includes/specialpage/RedirectSpecialPage.php: RedirectSpecialPage SpecialFilepath doesn't redirect!

Details

exception_id: W2scUwpAADkAAES2FfIAAAAC
exception_url: /w/index.php?title=Special:FilePath&file= ( .. ) &width=750

exception.trace:
#0 /srv/mediawiki/php-1.32.0-wmf.15/includes/specialpage/RedirectSpecialPage.php(56): RedirectSpecialPage->showNoRedirectPage()
#1 /srv/mediawiki/php-1.32.0-wmf.15/includes/specialpage/SpecialPage.php(566): RedirectSpecialPage->execute(NULL)
#2 /srv/mediawiki/php-1.32.0-wmf.15/includes/specialpage/SpecialPageFactory.php(569): SpecialPage->run(NULL)
#3 /srv/mediawiki/php-1.32.0-wmf.15/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)
#4 /srv/mediawiki/php-1.32.0-wmf.15/includes/MediaWiki.php(867): MediaWiki->performRequest()
#5 /srv/mediawiki/php-1.32.0-wmf.15/includes/MediaWiki.php(524): MediaWiki->main()
#6 /srv/mediawiki/php-1.32.0-wmf.15/index.php(42): MediaWiki->run()
#7 /srv/mediawiki/w/index.php(3): include(string)
#8 {main}

Event Timeline

Krinkle renamed this task from RedirectSpecialPage SpecialFilepath doesn't redirect! to Special:Filepath sometimes throws RedirectSpecialPage doesn't redirect!.Aug 14 2018, 8:21 PM
Krinkle renamed this task from Special:Filepath sometimes throws RedirectSpecialPage doesn't redirect! to Special:Filepath sometimes throws "MWException: SpecialFilepath doesn't redirect!".
Krinkle updated the task description. (Show Details)
Krinkle subscribed.

Still seen in the last week. Looks like some SpecialFilepath do not get a redirect, yet the class is missing an implementation for the showNoRedirectPage() method.

It needs to either have a redirect for every query, or an implementation of showNoRedirectPage() to handle non-redirect responses.

Umherirrender subscribed.

The file name provided in the screenshots looks invalid, because there are double encoded - %C3 is invalid in titles. In that case SpecialPage::getSafeTitleFor( 'Redirect', $argument ); does not return a title object and gets no redirect

https://commons.wikimedia.org/wiki/File:Konrad_Alexander_M%25C3%25BCller-Kurzwelly_-_Stornas.jpg
It works for the correct title: https://commons.wikimedia.org/wiki/Special:FilePath/Konrad_Alexander_M%C3%BCller-Kurzwelly_-_Stornas.jpg

I suggest to redirect to Special:Redirect/file with the invalid value prefilled in the form. This also happen for titles not found, but always have the same error messages. I have created T202183 for a possible distinct on that.

Change 453556 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Handle invalid input to Special:FilePath?file=

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

Change 453556 merged by jenkins-bot:
[mediawiki/core@master] Handle invalid input to Special:FilePath?file=

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

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:10 PM