Page MenuHomePhabricator

PHP Notice: Undefined index: normal
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
labels.normalized_message
[{reqId}] {exception_url}   PHP Notice: Undefined index: normal
error.stack_trace
from /srv/mediawiki/php-1.42.0-wmf.2/skins/Timeless/includes/TimelessTemplate.php(991)
#0 /srv/mediawiki/php-1.42.0-wmf.2/skins/Timeless/includes/TimelessTemplate.php(991): MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.42.0-wmf.2/skins/Timeless/includes/TimelessTemplate.php(97): MediaWiki\Skin\Timeless\TimelessTemplate->getCategories()
#2 /srv/mediawiki/php-1.42.0-wmf.2/includes/skins/SkinTemplate.php(148): MediaWiki\Skin\Timeless\TimelessTemplate->execute()
#3 /srv/mediawiki/php-1.42.0-wmf.2/includes/skins/SkinTemplate.php(174): SkinTemplate->generateHTML()
#4 /srv/mediawiki/php-1.42.0-wmf.2/includes/Output/OutputPage.php(2937): SkinTemplate->outputPage()
#5 /srv/mediawiki/php-1.42.0-wmf.2/includes/MediaWiki.php(978): MediaWiki\Output\OutputPage->output(boolean)
#6 /srv/mediawiki/php-1.42.0-wmf.2/includes/MediaWiki.php(613): MediaWiki->main()
#7 /srv/mediawiki/php-1.42.0-wmf.2/index.php(50): MediaWiki->run()
#8 /srv/mediawiki/php-1.42.0-wmf.2/index.php(46): wfIndexMain()
#9 /srv/mediawiki/w/index.php(3): require(string)
#10 {main}
Impact
Notes

Seeing a few of these and what I think are probably downstream errors in 1.42.0-wmf.2 (T348355) for mediawiki.org.

Event Timeline

Could https://gerrit.wikimedia.org/r/c/mediawiki/skins/Timeless/+/967553 cause this?

I have in the past found empty() to be a source of much confusion (returns true for falsey values besides an empty array), so I wouldn't be surprised.

Change 968745 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/skins/Timeless@master] Check key from OutputPage::getCategoryLinks

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

While creating the page the code behind OutputPage::getCategoryLinks and also the addition of new category links looks like the normal key is always set and only hidden is missing, when there are no hidden cats. That seems to be wrong. I have uploaded a isset() addition

Change 968745 merged by jenkins-bot:

[mediawiki/skins/Timeless@master] Check key from OutputPage::getCategoryLinks

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

Change 968325 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/skins/Timeless@wmf/1.42.0-wmf.2] Check key from OutputPage::getCategoryLinks

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

Jdforrester-WMF triaged this task as Unbreak Now! priority.Oct 25 2023, 10:05 PM
Jdforrester-WMF subscribed.

Train blocker -> UBN.

Change 968325 merged by jenkins-bot:

[mediawiki/skins/Timeless@wmf/1.42.0-wmf.2] Check key from OutputPage::getCategoryLinks

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

Deployed, appears fixed.