Page MenuHomePhabricator

Fatal: Argument to LogPage::getTitleLink() must be Language, StubUserLang given (via LogPage.php)
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

MediaWiki version: 1.35.0-wmf.19

message
Argument 2 passed to LogPage::getTitleLink() must be an instance of Language or null, instance of StubUserLang given, called in /srv/mediawiki/php-1.35.0-wmf.19/includes/logging/LogPage.php on line 246
exception.trace
#0 /srv/mediawiki/php-1.35.0-wmf.19/includes/logging/LogPage.php(246): LogPage::getTitleLink(Title, StubUserLang)
#1 /srv/mediawiki/php-1.35.0-wmf.19/includes/logging/LegacyLogFormatter.php(82): LogPage::actionText(string, string, Title, SkinVector, array, boolean)
#2 /srv/mediawiki/php-1.35.0-wmf.19/includes/logging/LogFormatter.php(456): LegacyLogFormatter->getActionMessage()
#3 /srv/mediawiki/php-1.35.0-wmf.19/includes/FeedUtils.php(69): LogFormatter->getActionText()
#4 /srv/mediawiki/php-1.35.0-wmf.19/includes/changes/ChangesFeed.php(119): FeedUtils::formatDiff(stdClass)
#5 /srv/mediawiki/php-1.35.0-wmf.19/includes/api/ApiFeedRecentChanges.php(84): ChangesFeed::buildItems(Wikimedia\Rdbms\ResultWrapper)
#6 /srv/mediawiki/php-1.35.0-wmf.19/includes/api/ApiMain.php(1586): ApiFeedRecentChanges->execute()
#7 /srv/mediawiki/php-1.35.0-wmf.19/includes/api/ApiMain.php(522): ApiMain->executeAction()
#8 /srv/mediawiki/php-1.35.0-wmf.19/includes/api/ApiMain.php(493): ApiMain->executeActionWithErrorHandling()
#9 /srv/mediawiki/php-1.35.0-wmf.19/api.php(84): ApiMain->execute()
#10 /srv/mediawiki/w/api.php(3): require(string)
#11 {main}

Notes

The instance of this error via LogPage.php seems to be new in 1.35-wmf.19, first seen 2012-02-13.

Details

Request ID
XkSbDgpAIDUAACUw0oYAAABS
Request URL
https://meta.wikimedia.org/w/api.php?…&action=feedrecentchanges&feedformat=atom&format=json

Event Timeline

Likely caused by 65e464644471 / https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/568469/ which is new in this week's train.

The code involves a legacy fallback to wgLang, which is not safe for that type hint.

\cc @thiemowmde @Florian

Daimona subscribed.

The code involves a legacy fallback to wgLang, which is not safe for that type hint.

This StubUserLang thing is such a PITA...

Change 572046 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/core@master] LogPage: Unstub $wgLang before use

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

Change 572069 had a related patch set uploaded (by Krinkle; owner: Daimona Eaytoy):
[mediawiki/core@wmf/1.35.0-wmf.19] LogPage: Unstub $wgLang before use

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

Change 572046 merged by jenkins-bot:
[mediawiki/core@master] LogPage: Unstub $wgLang before use

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

Change 572069 merged by jenkins-bot:
[mediawiki/core@wmf/1.35.0-wmf.19] LogPage: Unstub $wgLang before use

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

Jdforrester-WMF subscribed.

Deployed. Thank you.

Thanks to everyone involved in fixing this here, shame on me for not seeing this in the code-re iew :(