Page MenuHomePhabricator

PHP Deprecated: Use of MediaWiki\Parser\ParserOutput::getImages was deprecated in MediaWiki 1.43. [Called from MediaWiki\Extension\GlobalUsage\Hooks::onLinksUpdateComplete]
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
  • service.version: 1.45.0-wmf.23
  • timestamp: 2025-10-14T06:57:12.839Z
  • labels.phpversion: 8.1.33
  • trace.id: e82db5af-4bda-4d9c-988b-b99f97c02e3b
  • Find trace.id in Logstash
labels.normalized_message
[{reqId}] {exception_url}   PHP Deprecated: Use of MediaWiki\Parser\ParserOutput::getImages was deprecated in MediaWiki 1.43. [Called from MediaWiki\Extension\GlobalUsage\Hooks::onLinksUpdateComplete]
FrameLocationCall
from/srv/mediawiki/php-1.45.0-wmf.23/extensions/GlobalUsage/includes/Hooks.php(63)
#0[internal function]MediaWiki\Exception\MWExceptionHandler::handleError(int, string, string, string)
#1/srv/mediawiki/php-1.45.0-wmf.23/includes/debug/MWDebug.php(372)trigger_error(string, int)
#2/srv/mediawiki/php-1.45.0-wmf.23/includes/debug/MWDebug.php(343)MediaWiki\Debug\MWDebug::sendRawDeprecated(string, bool, string)
#3/srv/mediawiki/php-1.45.0-wmf.23/includes/debug/MWDebug.php(224)MediaWiki\Debug\MWDebug::deprecatedMsg(string, string, string, int)
#4/srv/mediawiki/php-1.45.0-wmf.23/includes/GlobalFunctions.php(773)MediaWiki\Debug\MWDebug::deprecated(string, string, string, int)
#5/srv/mediawiki/php-1.45.0-wmf.23/includes/parser/ParserOutput.php(930)wfDeprecated(string, string)
#6/srv/mediawiki/php-1.45.0-wmf.23/extensions/GlobalUsage/includes/Hooks.php(63)MediaWiki\Parser\ParserOutput->getImages()
#7/srv/mediawiki/php-1.45.0-wmf.23/includes/HookContainer/HookContainer.php(141)MediaWiki\Extension\GlobalUsage\Hooks->onLinksUpdateComplete(MediaWiki\Deferred\LinksUpdate\LinksUpdate, int)
#8/srv/mediawiki/php-1.45.0-wmf.23/includes/HookContainer/HookRunner.php(2666)MediaWiki\HookContainer\HookContainer->run(string, array)
#9/srv/mediawiki/php-1.45.0-wmf.23/includes/deferred/LinksUpdate/LinksUpdate.php(180)MediaWiki\HookContainer\HookRunner->onLinksUpdateComplete(MediaWiki\Deferred\LinksUpdate\LinksUpdate, int)
#10/srv/mediawiki/php-1.45.0-wmf.23/includes/deferred/AutoCommitUpdate.php(47)MediaWiki\Deferred\LinksUpdate\LinksUpdate->MediaWiki\Deferred\LinksUpdate\{closure}(Wikimedia\Rdbms\DBConnRef, string)
#11/srv/mediawiki/php-1.45.0-wmf.23/includes/deferred/DeferredUpdates.php(445)MediaWiki\Deferred\AutoCommitUpdate->doUpdate()
#12/srv/mediawiki/php-1.45.0-wmf.23/includes/deferred/DeferredUpdates.php(187)MediaWiki\Deferred\DeferredUpdates::attemptUpdate(MediaWiki\Deferred\AutoCommitUpdate)
#13/srv/mediawiki/php-1.45.0-wmf.23/includes/deferred/DeferredUpdates.php(285)MediaWiki\Deferred\DeferredUpdates::run(MediaWiki\Deferred\AutoCommitUpdate)
#14/srv/mediawiki/php-1.45.0-wmf.23/includes/deferred/DeferredUpdatesScope.php(229)MediaWiki\Deferred\DeferredUpdates::MediaWiki\Deferred\{closure}(MediaWiki\Deferred\AutoCommitUpdate, int)
#15/srv/mediawiki/php-1.45.0-wmf.23/includes/deferred/DeferredUpdatesScope.php(158)MediaWiki\Deferred\DeferredUpdatesScope->processStageQueue(int, int, Closure)
#16/srv/mediawiki/php-1.45.0-wmf.23/includes/deferred/DeferredUpdates.php(288)MediaWiki\Deferred\DeferredUpdatesScope->processUpdates(int, Closure)
#17/srv/mediawiki/php-1.45.0-wmf.23/includes/deferred/DeferredUpdatesScope.php(226)MediaWiki\Deferred\DeferredUpdates::MediaWiki\Deferred\{closure}(MediaWiki\Deferred\RefreshSecondaryDataUpdate, int)
#18/srv/mediawiki/php-1.45.0-wmf.23/includes/deferred/DeferredUpdatesScope.php(158)MediaWiki\Deferred\DeferredUpdatesScope->processStageQueue(int, int, Closure)
#19/srv/mediawiki/php-1.45.0-wmf.23/includes/deferred/DeferredUpdates.php(293)MediaWiki\Deferred\DeferredUpdatesScope->processUpdates(int, Closure)
#20/srv/mediawiki/php-1.45.0-wmf.23/includes/MediaWikiEntryPoint.php(656)MediaWiki\Deferred\DeferredUpdates::doUpdates()
#21/srv/mediawiki/php-1.45.0-wmf.23/includes/MediaWikiEntryPoint.php(478)MediaWiki\MediaWikiEntryPoint->restInPeace()
#22/srv/mediawiki/php-1.45.0-wmf.23/includes/MediaWikiEntryPoint.php(436)MediaWiki\MediaWikiEntryPoint->doPostOutputShutdown()
#23/srv/mediawiki/php-1.45.0-wmf.23/includes/MediaWikiEntryPoint.php(193)MediaWiki\MediaWikiEntryPoint->postOutputShutdown()
#24/srv/mediawiki/php-1.45.0-wmf.23/api.php(30)MediaWiki\MediaWikiEntryPoint->run()
#25/srv/mediawiki/w/api.php(3)require(string)
#26{main}
Impact
Notes

ParserOutput::getImages has been deprecated by @cscott with bc5962218ed7c8f91d8c5746de304aefe0bd25b1 but GlobalUsage still uses it (mw:Extension:GlobalUsage).

Event Timeline

Change #1195981 had a related patch set uploaded (by Jgiannelos; author: Jgiannelos):

[mediawiki/extensions/GlobalUsage@master] Replace call to deprecated method getImages

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

Change #1195981 merged by jenkins-bot:

[mediawiki/extensions/GlobalUsage@master] Replace call to deprecated method getImages

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

This should now be fixed; I assume it's not loud enough to be worth back-porting?

@hashar mentioned that the error comes from a special page that is manually filed so it is hardly a problem.

+1 I agree it is not important and can roll with next week train. I'll consider muting this specific error in the error logs dashboard.

Thank you for the quick fix!

From https://grafana.wikimedia.org/d/000000102/mediawiki-production-logging , that seems to occur every two hours:

getImages_spikes.png (487×372 px, 22 KB)

Can this be due to background jobs triggering on a fixed schedule or maybe a bot is spamming the GlobalUsage API.

+1 I agree it is not important and can roll with next week train. I'll consider muting this specific error in the error logs dashboard.

Yesterday with group 0 wikis, the deprecated warnings was emitted in small spikes every two hours. Now that I have promoted group 1 wikis, there are much more error generated and it is a bit spammy. That hides some other signals, which I did not realize yesterday:

https://grafana.wikimedia.org/d/000000102/mediawiki-production-logging?orgId=1&from=now-3h&to=now&timezone=utc&var-datasource=000000006&var-level=$__all&var-channel=$__all&refresh=5m&viewPanel=panel-19 :

getImages_deprecation.png (667×350 px, 23 KB)

And in the SpiderPig deployment interface, the top tab shows an ever increasing counter of MediaWiki error logs:

SpiderPig_mw_errors.png (820×135 px, 30 KB)

I am thus inclined to have the change backported to this week 1.45.0-wmf.23 in order to cut the log spam. Sorry for the change of mind.

Change #1196375 had a related patch set uploaded (by Hashar; author: Jgiannelos):

[mediawiki/extensions/GlobalUsage@wmf/1.45.0-wmf.23] Replace call to deprecated method getImages

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

Change #1196375 merged by jenkins-bot:

[mediawiki/extensions/GlobalUsage@wmf/1.45.0-wmf.23] Replace call to deprecated method getImages

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

Mentioned in SAL (#wikimedia-operations) [2025-10-15T10:11:54Z] <hashar@deploy2002> Started scap sync-world: Backport for [[gerrit:1196375|Replace call to deprecated method getImages (T407184)]]

Mentioned in SAL (#wikimedia-operations) [2025-10-15T10:16:11Z] <hashar@deploy2002> hashar: Backport for [[gerrit:1196375|Replace call to deprecated method getImages (T407184)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-10-15T10:44:13Z] <hashar@deploy2002> Finished scap sync-world: Backport for [[gerrit:1196375|Replace call to deprecated method getImages (T407184)]] (duration: 32m 19s)

We have backported the change and the errors have vanished.