Page MenuHomePhabricator

[1.32.0-wmf.22] includes/GlobalPreferencesFactory.php: PHP Notice: Undefined index: section
Closed, ResolvedPublicPRODUCTION ERROR

Description

Exception id: W6J6LArAIDoAAIP8@ScAAABQ

Message: PHP Notice: Undefined index: section

#0 /srv/mediawiki/php-1.32.0-wmf.22/extensions/GlobalPreferences/includes/GlobalPreferencesFactory.php(172): MWExceptionHandler::handleError(integer, string, string, integer, array, array)
#1 /srv/mediawiki/php-1.32.0-wmf.22/extensions/GlobalPreferences/includes/GlobalPreferencesFactory.php(119): GlobalPreferences\GlobalPreferencesFactory->getPreferencesLocal(array, array, RequestContext)
#2 /srv/mediawiki/php-1.32.0-wmf.22/includes/preferences/DefaultPreferencesFactory.php(1496): GlobalPreferences\GlobalPreferencesFactory->getFormDescriptor(User, RequestContext)
#3 /srv/mediawiki/php-1.32.0-wmf.22/includes/specials/SpecialPreferences.php(173): MediaWiki\Preferences\DefaultPreferencesFactory->getForm(User, RequestContext, string)
#4 /srv/mediawiki/php-1.32.0-wmf.22/includes/specials/SpecialPreferences.php(112): SpecialPreferences->getFormObject(User, RequestContext)
#5 /srv/mediawiki/php-1.32.0-wmf.22/includes/specialpage/SpecialPage.php(569): SpecialPreferences->execute(NULL)
#6 /srv/mediawiki/php-1.32.0-wmf.22/includes/specialpage/SpecialPageFactory.php(581): SpecialPage->run(NULL)
#7 /srv/mediawiki/php-1.32.0-wmf.22/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#8 /srv/mediawiki/php-1.32.0-wmf.22/includes/MediaWiki.php(868): MediaWiki->performRequest()
#9 /srv/mediawiki/php-1.32.0-wmf.22/includes/MediaWiki.php(525): MediaWiki->main()
#10 /srv/mediawiki/php-1.32.0-wmf.22/index.php(42): MediaWiki->run()
#11 /srv/mediawiki/w/index.php(3): include(string)
#12 {main}

Or via the API:

#0 /srv/mediawiki/php-1.32.0-wmf.22/extensions/GlobalPreferences/includes/GlobalPreferencesFactory.php(172): MWExceptionHandler::handleError(integer, string, string, integer, array, array)
#1 /srv/mediawiki/php-1.32.0-wmf.22/extensions/GlobalPreferences/includes/GlobalPreferencesFactory.php(119): GlobalPreferences\GlobalPreferencesFactory->getPreferencesLocal(array, array, DerivativeContext)
#2 /srv/mediawiki/php-1.32.0-wmf.22/includes/api/ApiOptions.php(149): GlobalPreferences\GlobalPreferencesFactory->getFormDescriptor(User, DerivativeContext)
#3 /srv/mediawiki/php-1.32.0-wmf.22/includes/api/ApiOptions.php(75): ApiOptions->getPreferences()
#4 /srv/mediawiki/php-1.32.0-wmf.22/includes/api/ApiMain.php(1587): ApiOptions->execute()
#5 /srv/mediawiki/php-1.32.0-wmf.22/includes/api/ApiMain.php(531): ApiMain->executeAction()
#6 /srv/mediawiki/php-1.32.0-wmf.22/includes/api/ApiMain.php(502): ApiMain->executeActionWithErrorHandling()
#7 /srv/mediawiki/php-1.32.0-wmf.22/api.php(87): ApiMain->execute()
#8 /srv/mediawiki/w/api.php(3): include(string)
#9 {main}

https://test.wikipedia.org/wiki/Special:Preferences

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Krinkle subscribed.

Triaging as Meta/Low priority for the time being as I've not been able to reproduce this on a wiki besides test.wikipedia.org. It is still likely to be a real problem, but at least the particular circumstances required for it (e.g. a combination of two extensions registering certain preferences) is not being triggered elsewhere.

Belay that. I can reproduce it on ca.wikipedia.org now. Submitting the form at https://ca.wikipedia.org/wiki/Especial:Llista_de_seguiment consistently produces:

PHP Notice: Undefined index: section

#0 /srv/mediawiki/php-1.32.0-wmf.22/extensions/GlobalPreferences/includes/GlobalPreferencesFactory.php(166): MWExceptionHandler::handleError(integer, string, string, integer, array, array)
#1 /srv/mediawiki/php-1.32.0-wmf.22/extensions/GlobalPreferences/includes/GlobalPreferencesFactory.php(119): GlobalPreferences\GlobalPreferencesFactory->getPreferencesLocal(array, array, RequestContext)
#2 /srv/mediawiki/php-1.32.0-wmf.22/includes/preferences/DefaultPreferencesFactory.php(1496): GlobalPreferences\GlobalPreferencesFactory->getFormDescriptor(User, RequestContext)
#3 /srv/mediawiki/php-1.32.0-wmf.22/includes/specials/SpecialPreferences.php(173): MediaWiki\Preferences\DefaultPreferencesFactory->getForm(User, RequestContext, string)
#4 /srv/mediawiki/php-1.32.0-wmf.22/includes/specials/SpecialPreferences.php(112): SpecialPreferences->getFormObject(User, RequestContext)
#5 /srv/mediawiki/php-1.32.0-wmf.22/includes/specialpage/SpecialPage.php(569): SpecialPreferences->execute(NULL)
#6 /srv/mediawiki/php-1.32.0-wmf.22/includes/specialpage/SpecialPageFactory.php(581): SpecialPage->run(NULL)
#7 /srv/mediawiki/php-1.32.0-wmf.22/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#8 /srv/mediawiki/php-1.32.0-wmf.22/includes/MediaWiki.php(868): MediaWiki->performRequest()
#9 /srv/mediawiki/php-1.32.0-wmf.22/includes/MediaWiki.php(525): MediaWiki->main()
#10 /srv/mediawiki/php-1.32.0-wmf.22/index.php(42): MediaWiki->run()

This error is not seen on earlier branches and not yet seen on group2 wikis (which run wmf.20). As such, marking as regression.

Change 461499 had a related patch set uploaded (by MaxSem; owner: MaxSem):
[mediawiki/extensions/GlobalPreferences@master] Consider pref sections optional

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

Change 461501 had a related patch set uploaded (by Krinkle; owner: MaxSem):
[mediawiki/extensions/GlobalPreferences@wmf/1.32.0-wmf.22] Consider pref sections optional

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

Change 461499 merged by jenkins-bot:
[mediawiki/extensions/GlobalPreferences@master] Consider pref sections optional

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

Change 461501 merged by jenkins-bot:
[mediawiki/extensions/GlobalPreferences@wmf/1.32.0-wmf.22] Consider pref sections optional

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

Mentioned in SAL (#wikimedia-operations) [2018-09-20T01:14:45Z] <krinkle@deploy1001> Synchronized php-1.32.0-wmf.22/extensions/GlobalPreferences/includes/GlobalPreferencesFactory.php: I52434a523f60e, T204864 (duration: 00m 58s)

Krinkle assigned this task to MaxSem.
Krinkle removed a project: Patch-For-Review.
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:08 PM