Page MenuHomePhabricator

FlaggedRevs: PHP Notice: Undefined index: status
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

MediaWiki version: 1.36.0-wmf.36

message
PHP Notice: Undefined index: status
exception.trace
from /srv/mediawiki/php-1.36.0-wmf.36/extensions/FlaggedRevs/backend/FlaggedRevs.php(271)
#0 /srv/mediawiki/php-1.36.0-wmf.36/extensions/FlaggedRevs/backend/FlaggedRevs.php(271): MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.36.0-wmf.36/extensions/FlaggedRevs/frontend/RevisionReviewFormUI.php(377): FlaggedRevs::getLevels()
#2 /srv/mediawiki/php-1.36.0-wmf.36/extensions/FlaggedRevs/frontend/RevisionReviewFormUI.php(303): RevisionReviewFormUI->ratingFormTags(User, array)
#3 /srv/mediawiki/php-1.36.0-wmf.36/extensions/FlaggedRevs/frontend/RevisionReviewFormUI.php(198): RevisionReviewFormUI->ratingInputs(User, array, boolean, boolean)
#4 /srv/mediawiki/php-1.36.0-wmf.36/extensions/FlaggedRevs/frontend/FlaggablePageView.php(1336): RevisionReviewFormUI->getHtml()
#5 /srv/mediawiki/php-1.36.0-wmf.36/extensions/FlaggedRevs/frontend/FlaggedRevsUIHooks.php(400): FlaggablePageView->addReviewForm(string)
#6 /srv/mediawiki/php-1.36.0-wmf.36/includes/HookContainer/HookContainer.php(330): FlaggedRevsUIHooks::onSkinAfterContent(string, SkinMinerva)
#7 /srv/mediawiki/php-1.36.0-wmf.36/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#8 /srv/mediawiki/php-1.36.0-wmf.36/includes/HookContainer/HookRunner.php(3520): MediaWiki\HookContainer\HookContainer->run(string, array)
#9 /srv/mediawiki/php-1.36.0-wmf.36/includes/skins/Skin.php(718): MediaWiki\HookContainer\HookRunner->onSkinAfterContent(string, SkinMinerva)
#10 /srv/mediawiki/php-1.36.0-wmf.36/includes/skins/SkinMustache.php(187): Skin->afterContentHook()
#11 /srv/mediawiki/php-1.36.0-wmf.36/skins/MinervaNeue/includes/Skins/SkinMinerva.php(73): SkinMustache->getTemplateData()
#12 /srv/mediawiki/php-1.36.0-wmf.36/includes/skins/SkinMustache.php(136): SkinMinerva->getTemplateData()
#13 /srv/mediawiki/php-1.36.0-wmf.36/includes/skins/SkinTemplate.php(146): SkinMustache->generateHTML()
#14 /srv/mediawiki/php-1.36.0-wmf.36/includes/OutputPage.php(2634): SkinTemplate->outputPage()
#15 /srv/mediawiki/php-1.36.0-wmf.36/includes/MediaWiki.php(931): OutputPage->output(boolean)
#16 /srv/mediawiki/php-1.36.0-wmf.36/includes/MediaWiki.php(944): MediaWiki::{closure}()
#17 /srv/mediawiki/php-1.36.0-wmf.36/includes/MediaWiki.php(547): MediaWiki->main()
#18 /srv/mediawiki/php-1.36.0-wmf.36/index.php(53): MediaWiki->run()
#19 /srv/mediawiki/php-1.36.0-wmf.36/index.php(46): wfIndexMain()
#20 /srv/mediawiki/w/index.php(3): require(string)
#21 {main}

Impact

Notes

Apparently just on enwiki pages.

Immediately followed by:

PHP Warning: Invalid argument supplied for foreach()
/srv/mediawiki/php-1.36.0-wmf.36/extensions/FlaggedRevs/frontend/RevisionReviewFormUI.php:385
from /srv/mediawiki/php-1.36.0-wmf.36/extensions/FlaggedRevs/frontend/RevisionReviewFormUI.php(385)
#0 /srv/mediawiki/php-1.36.0-wmf.36/extensions/FlaggedRevs/frontend/RevisionReviewFormUI.php(385): MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.36.0-wmf.36/extensions/FlaggedRevs/frontend/RevisionReviewFormUI.php(303): RevisionReviewFormUI->ratingFormTags(User, array)
#2 /srv/mediawiki/php-1.36.0-wmf.36/extensions/FlaggedRevs/frontend/RevisionReviewFormUI.php(198): RevisionReviewFormUI->ratingInputs(User, array, boolean, boolean)
#3 /srv/mediawiki/php-1.36.0-wmf.36/extensions/FlaggedRevs/frontend/FlaggablePageView.php(1336): RevisionReviewFormUI->getHtml()
#4 /srv/mediawiki/php-1.36.0-wmf.36/extensions/FlaggedRevs/frontend/FlaggedRevsUIHooks.php(400): FlaggablePageView->addReviewForm(string)
#5 /srv/mediawiki/php-1.36.0-wmf.36/includes/HookContainer/HookContainer.php(330): FlaggedRevsUIHooks::onSkinAfterContent(string, SkinMinerva)
#6 /srv/mediawiki/php-1.36.0-wmf.36/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#7 /srv/mediawiki/php-1.36.0-wmf.36/includes/HookContainer/HookRunner.php(3520): MediaWiki\HookContainer\HookContainer->run(string, array)
#8 /srv/mediawiki/php-1.36.0-wmf.36/includes/skins/Skin.php(718): MediaWiki\HookContainer\HookRunner->onSkinAfterContent(string, SkinMinerva)
#9 /srv/mediawiki/php-1.36.0-wmf.36/includes/skins/SkinMustache.php(187): Skin->afterContentHook()
#10 /srv/mediawiki/php-1.36.0-wmf.36/skins/MinervaNeue/includes/Skins/SkinMinerva.php(73): SkinMustache->getTemplateData()
#11 /srv/mediawiki/php-1.36.0-wmf.36/includes/skins/SkinMustache.php(136): SkinMinerva->getTemplateData()
#12 /srv/mediawiki/php-1.36.0-wmf.36/includes/skins/SkinTemplate.php(146): SkinMustache->generateHTML()
#13 /srv/mediawiki/php-1.36.0-wmf.36/includes/OutputPage.php(2634): SkinTemplate->outputPage()
#14 /srv/mediawiki/php-1.36.0-wmf.36/includes/MediaWiki.php(931): OutputPage->output(boolean)
#15 /srv/mediawiki/php-1.36.0-wmf.36/includes/MediaWiki.php(944): MediaWiki::{closure}()
#16 /srv/mediawiki/php-1.36.0-wmf.36/includes/MediaWiki.php(547): MediaWiki->main()
#17 /srv/mediawiki/php-1.36.0-wmf.36/index.php(53): MediaWiki->run()
#18 /srv/mediawiki/php-1.36.0-wmf.36/index.php(46): wfIndexMain()
#19 /srv/mediawiki/w/index.php(3): require(string)
#20 {main}

Event Timeline

hashar triaged this task as High priority.Mar 25 2021, 7:16 PM
hashar created this task.
hashar raised the priority of this task from High to Unbreak Now!.Mar 25 2021, 7:17 PM

I don't quite know what the impact is, but FlaggedRevs was flagged as a risky change for this week train ( T274940#6927548 ).

I don't have any knowledge about FlaggedRevs, it was flagged as a risky change though and there is no some errors surfacing. Maybe that affects the ui being shown and I am just going to rollback to be safe.

Change 674958 had a related patch set uploaded (by Hashar; author: Hashar):
[operations/mediawiki-config@master] Revert "ruwiki: flaggedrevs: Delete autoeditor group"

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

Change 674958 abandoned by Hashar:
[operations/mediawiki-config@master] Revert "ruwiki: flaggedrevs: Delete autoeditor group"

Reason:

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

Change 674960 had a related patch set uploaded (by Hashar; author: Hashar):
[operations/mediawiki-config@master] Revert "all wikis to 1.36.0-wmf.36"

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

Change 674960 merged by jenkins-bot:
[operations/mediawiki-config@master] Revert "all wikis to 1.36.0-wmf.36"

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

hashar renamed this task from PHP Notice: Undefined index: status to FlaggedRevs: PHP Notice: Undefined index: status.Mar 25 2021, 7:48 PM

so the problem is when a wiki is on "protect mode" (=simple mode). It doesn't even load the only dimension it has so it doesn't iterate through them. When I changed it to support only one dimension, I didn't know it has such an implicit assumption in the code (specially given the fact that all wikis have one dimension in their configs even wikis that don't use them) and broke things https://gerrit.wikimedia.org/r/c/mediawiki/extensions/FlaggedRevs/+/672570. I try to find a fix and push it to mwdebug tomorrow to confirm it's fixed and then we can get it landed and backported.

Change 675005 had a related patch set uploaded (by Ladsgroup; author: Ladsgroup):
[mediawiki/extensions/FlaggedRevs@master] Wrap most of functionalities depending on protect mode on condition

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

Tested locally, this patch fixes the issue ^

Unexplained close by a brand new account, @Ladsgroup am I correct in thinking this is still open?

Yes. That was vandalism. Thank you for reverting

Change 675005 merged by jenkins-bot:
[mediawiki/extensions/FlaggedRevs@master] Wrap most of functionalities depending on protect mode in a condition

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

Change 675161 had a related patch set uploaded (by Jforrester; author: Ladsgroup):
[mediawiki/extensions/FlaggedRevs@wmf/1.36.0-wmf.36] Wrap most of functionalities depending on protect mode in a condition

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

I'll deploy this Monday morning.

Change 675161 merged by jenkins-bot:
[mediawiki/extensions/FlaggedRevs@wmf/1.36.0-wmf.36] Wrap most of functionalities depending on protect mode in a condition

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

Mentioned in SAL (#wikimedia-operations) [2021-03-29T07:49:04Z] <ladsgroup@deploy1002> Synchronized php-1.36.0-wmf.36/extensions/FlaggedRevs: [[gerrit:675161|Wrap most of functionalities depending on protect mode in a condition]] (T278478) (duration: 01m 08s)

Mentioned in SAL (#wikimedia-operations) [2021-03-29T07:54:52Z] <hashar@deploy1002> Synchronized php-1.36.0-wmf.36/extensions/FlaggedRevs: Wrap most of functionalities depending on protect mode in a condition - T278478 (duration: 01m 08s)