Page MenuHomePhabricator

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

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

Krinkle created this task.Feb 13 2020, 5:22 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 13 2020, 5:22 PM

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

Krinkle triaged this task as Unbreak Now! priority.Feb 13 2020, 5:24 PM
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptFeb 13 2020, 5:24 PM
Daimona claimed this task.Feb 13 2020, 5:39 PM
Daimona added a subscriber: Daimona.

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 closed this task as Resolved.Feb 13 2020, 7:48 PM
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

Deployed. Thank you.

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