Page MenuHomePhabricator

MobileFrontend fatal in SpecialPage_initList hook
Closed, ResolvedPublic

Description

Part of the problem in bug 70686 was that we were blindly redirecting special pages without knowing that the redirect target was another name for the same special page. Fixing that means we need to actually check the aliases' targets.

Fetching the aliases' targets means that the SpecialPage_initList hook may be called earlier in MediaWiki's initialization process. In particular, it may be called when determining the Title object to be placed in the RequestContext.

[2014-09-25 19:15:42] Fatal error: Call to a member function getFullURL() on a non-object at /srv/mediawiki/php-1.25wmf1/extensions/MobileFrontend/includes/MobileContext.php on line 912
Server: mw1028
Method: GET
URL: http://www.mediawiki.org/w/index.php?title=Special:Search&search=&fulltext=Search&mobileaction=toggle_view_desktop
Cookie: <redacted>
Backtrace:
#0 /srv/mediawiki/php-1.25wmf1/extensions/MobileFrontend/includes/MobileContext.php(912): MobileContext::toggleView()
#1 /srv/mediawiki/php-1.25wmf1/extensions/MobileFrontend/includes/MobileContext.php(955): MobileContext->toggleView('desktop')
#2 /srv/mediawiki/php-1.25wmf1/extensions/MobileFrontend/includes/MobileContext.php(343): MobileContext->checkToggleView()
#3 /srv/mediawiki/php-1.25wmf1/extensions/MobileFrontend/includes/MobileFrontend.hooks.php(328): MobileContext->shouldDisplayMobileView()
#4 [internal function]: MobileFrontendHooks::onSpecialPage_initList(Array)
#5 /srv/mediawiki/php-1.25wmf1/includes/Hooks.php(206): call_user_func_array('MobileFrontendH...', Array)
#6 /srv/mediawiki/php-1.25wmf1/includes/GlobalFunctions.php(3991): Hooks::run('SpecialPage_ini...', Array, NULL)
#7 /srv/mediawiki/php-1.25wmf1/includes/specialpage/SpecialPageFactory.php(255): wfRunHooks('SpecialPage_ini...', Array)
#8 /srv/mediawiki/php-1.25wmf1/includes/specialpage/SpecialPageFactory.php(279): SpecialPageFactory::getPageList()
#9 /srv/mediawiki/php-1.25wmf1/includes/specialpage/SpecialPageFactory.php(645): SpecialPageFactory::getAliasListObject()
#10 /srv/mediawiki/php-1.25wmf1/includes/specialpage/SpecialPage.php(69): SpecialPageFactory::getLocalNameFor('Search', false)
#11 /srv/mediawiki/php-1.25wmf1/includes/MediaWiki.php(68): SpecialPage::getTitleFor('Search')
#12 /srv/mediawiki/php-1.25wmf1/includes/MediaWiki.php(125): MediaWiki->parseTitle()
#13 /srv/mediawiki/php-1.25wmf1/includes/MediaWiki.php(507): MediaWiki->getTitle()
#14 /srv/mediawiki/php-1.25wmf1/includes/MediaWiki.php(435): MediaWiki->main()
#15 /srv/mediawiki/php-1.25wmf1/index.php(46): MediaWiki->run()
#16 /srv/mediawiki/w/index.php(3): require('/srv/mediawiki/...')
#17 {main}


Version: unspecified
Severity: critical

Details

Reference
bz71329

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:58 AM
bzimport set Reference to bz71329.
bzimport added a subscriber: Unknown Object (MLST).
Anomie created this task.Sep 25 2014, 8:08 PM

bingle-admin wrote:

Prioritization and scheduling of this bug is tracked on Trello card https://trello.com/c/OxXcHddW

Change 163073 had a related patch set uploaded by MaxSem:
Fix fatals due to core changes

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

Change 163073 merged by jenkins-bot:
Fix fatals due to core changes

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

Change 163655 had a related patch set uploaded by MaxSem:
Fix fatals due to core changes

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

Change 163655 abandoned by MaxSem:
Fix fatals due to core changes

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

This should be fixed in 1.25wmf1 later today. (The deployment branch was recut from master.)

deployed in I0829e865ba01436e984bf43fb23e606575d6d35c