Page MenuHomePhabricator

Use of Language::formatNum with a non-numeric string was deprecated in MediaWiki 1.36. [Called from Language::formatNum]
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error message
Use of Language::formatNum with a non-numeric string was deprecated in MediaWiki 1.36. [Called from Language::formatNum]
Impact

Logspam, that's all.

Notes

Unlike the earlier formatNum-related deprecation warnings (T266677, T263592), this seems to be triggered by the CentralAuth extension.

Details

Request ID
2223fe11-0683-4152-8948-1325e4e6d642
Stack Trace
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, string, array)
#1 /srv/mediawiki/php-1.36.0-wmf.16/includes/debug/MWDebug.php(329): trigger_error(string, integer)
#2 /srv/mediawiki/php-1.36.0-wmf.16/includes/debug/MWDebug.php(305): MWDebug::sendRawDeprecated(string, boolean, string)
#3 /srv/mediawiki/php-1.36.0-wmf.16/includes/debug/MWDebug.php(234): MWDebug::deprecatedMsg(string, string, string, integer)
#4 /srv/mediawiki/php-1.36.0-wmf.16/includes/GlobalFunctions.php(1029): MWDebug::deprecated(string, string, string, integer)
#5 /srv/mediawiki/php-1.36.0-wmf.16/languages/Language.php(3286): wfDeprecated(string, string)
#6 /srv/mediawiki/php-1.36.0-wmf.16/languages/Language.php(3265): Language->formatNumInternal(string, boolean, boolean)
#7 /srv/mediawiki/php-1.36.0-wmf.16/includes/language/Message.php(1176): Language->formatNum(string)
#8 /srv/mediawiki/php-1.36.0-wmf.16/includes/language/Message.php(1140): Message->extractParam(array, string)
#9 /srv/mediawiki/php-1.36.0-wmf.16/includes/language/Message.php(872): Message->replaceParameters(string, string, string)
#10 /srv/mediawiki/php-1.36.0-wmf.16/includes/language/Message.php(941): Message->toString(string)
#11 /srv/mediawiki/php-1.36.0-wmf.16/extensions/CentralAuth/includes/specials/SpecialCentralAuth.php(754): Message->text()
#12 /srv/mediawiki/php-1.36.0-wmf.16/extensions/CentralAuth/includes/specials/SpecialCentralAuth.php(521): SpecialCentralAuth->formatEditcount(array)
#13 [internal function]: SpecialCentralAuth->listWikiItem(array)
#14 /srv/mediawiki/php-1.36.0-wmf.16/extensions/CentralAuth/includes/specials/SpecialCentralAuth.php(480): array_map(array, array)
#15 /srv/mediawiki/php-1.36.0-wmf.16/extensions/CentralAuth/includes/specials/SpecialCentralAuth.php(412): SpecialCentralAuth->listAccounts(array)
#16 /srv/mediawiki/php-1.36.0-wmf.16/extensions/CentralAuth/includes/specials/SpecialCentralAuth.php(168): SpecialCentralAuth->showWikiLists()
#17 /srv/mediawiki/php-1.36.0-wmf.16/includes/specialpage/SpecialPage.php(607): SpecialCentralAuth->execute(string)
#18 /srv/mediawiki/php-1.36.0-wmf.16/includes/specialpage/SpecialPageFactory.php(1168): SpecialPage->run(string)
#19 /srv/mediawiki/php-1.36.0-wmf.16/includes/MediaWiki.php(310): MediaWiki\SpecialPage\SpecialPageFactory->executePath(Title, RequestContext)
#20 /srv/mediawiki/php-1.36.0-wmf.16/includes/MediaWiki.php(943): MediaWiki->performRequest()
#21 /srv/mediawiki/php-1.36.0-wmf.16/includes/MediaWiki.php(546): MediaWiki->main()
#22 /srv/mediawiki/php-1.36.0-wmf.16/index.php(53): MediaWiki->run()
#23 /srv/mediawiki/php-1.36.0-wmf.16/index.php(46): wfIndexMain()
#24 /srv/mediawiki/w/index.php(3): require(string)
#25 {main}

Event Timeline

Adding provisionally as a wmf.16 blocker, since it was noticed during group0 deploy (T267091#6606967). We'll see if the volume of logspam actually justifies it being a blocker though, maybe not.

Change 639603 had a related patch set uploaded (by C. Scott Ananian; owner: C. Scott Ananian):
[mediawiki/extensions/CentralAuth@master] Don't double-format numeric edit count

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

Re: impact -- as I understand it, this warning is triggered when a user with more than ~1,000-10,000 edits visits Special:CentralAuth.

I saw ~18 of these in a few minutes. It's more noise than I'd like to introduce, assuming that rate is constant.

Change 639603 merged by jenkins-bot:
[mediawiki/extensions/CentralAuth@master] Don't double-format numeric edit count

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

Change 639500 had a related patch set uploaded (by C. Scott Ananian; owner: C. Scott Ananian):
[mediawiki/extensions/CentralAuth@wmf/1.36.0-wmf.16] Don't double-format numeric edit count

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

Merged & cherry-picked to wmf.16. There may be a few more of the formatNum cases, but hopefully we're getting into the long tail now.

Change 639500 merged by jenkins-bot:
[mediawiki/extensions/CentralAuth@wmf/1.36.0-wmf.16] Don't double-format numeric edit count

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

Change 639502 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[mediawiki/extensions/CentralAuth@wmf/1.36.0-wmf.16] Revert "Don't double-format numeric edit count"

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

Change 639502 merged by Urbanecm:
[mediawiki/extensions/CentralAuth@wmf/1.36.0-wmf.16] Revert "Don't double-format numeric edit count"

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

@cscott I've reverted your patch for the wmf branch, because Morning B&C window started, and you did not respond to IRC patch. Feel free to deploy it later if it should be deployed, but please do not +2 in WMF branches without deploying the code. Thank you.

For clarity, I will plan to deploy this one after the backport window finishes.

brennen triaged this task as Unbreak Now! priority.Nov 5 2020, 7:39 PM

(Train blockers are UBN.)

Mentioned in SAL (#wikimedia-operations) [2020-11-05T20:15:25Z] <brennen@deploy1001> Synchronized php-1.36.0-wmf.16/extensions/CentralAuth/includes/specials/SpecialCentralAuth.php: Backport: [[gerrit:639500|Dont double-format numeric edit count (T267362)]] (duration: 01m 06s)