Page MenuHomePhabricator

TypeError: Return value of WikimediaBadges\WikibaseClientSiteLinksForItemHandler::getItem() must be an instance of Wikibase\DataModel\Entity\Item, null returned
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   TypeError: Return value of WikimediaBadges\WikibaseClientSiteLinksForItemHandler::getItem() must be an instance of Wikibase\DataModel\Entity\Item, null returned
exception.trace
from /srv/mediawiki/php-1.38.0-wmf.1/extensions/WikimediaBadges/includes/WikibaseClientSiteLinksForItemHandler.php(212)
#0 /srv/mediawiki/php-1.38.0-wmf.1/extensions/WikimediaBadges/includes/WikibaseClientSiteLinksForItemHandler.php(194): WikimediaBadges\WikibaseClientSiteLinksForItemHandler->getItem(Wikibase\DataModel\Entity\ItemId)
#1 /srv/mediawiki/php-1.38.0-wmf.1/extensions/WikimediaBadges/includes/WikibaseClientSiteLinksForItemHandler.php(147): WikimediaBadges\WikibaseClientSiteLinksForItemHandler->getCommonsSitelinkFromMainSnaks(array, Wikibase\DataModel\Entity\ItemId, Wikibase\DataModel\Entity\NumericPropertyId)
#2 /srv/mediawiki/php-1.38.0-wmf.1/extensions/WikimediaBadges/includes/WikibaseClientSiteLinksForItemHandler.php(112): WikimediaBadges\WikibaseClientSiteLinksForItemHandler->getLinkedItemSitelink(Wikibase\DataModel\Entity\Item, string)
#3 /srv/mediawiki/php-1.38.0-wmf.1/extensions/WikimediaBadges/includes/WikibaseClientSiteLinksForItemHandler.php(89): WikimediaBadges\WikibaseClientSiteLinksForItemHandler->getCommonsSiteLink(Wikibase\DataModel\Entity\Item)
#4 /srv/mediawiki/php-1.38.0-wmf.1/extensions/WikimediaBadges/includes/WikibaseClientSiteLinksForItemHandler.php(81): WikimediaBadges\WikibaseClientSiteLinksForItemHandler->doProvideSiteLinks(Wikibase\DataModel\Entity\Item, array)
#5 /srv/mediawiki/php-1.38.0-wmf.1/includes/HookContainer/HookContainer.php(338): WikimediaBadges\WikibaseClientSiteLinksForItemHandler::provideSiteLinks(Wikibase\DataModel\Entity\Item, array, Wikibase\Client\Usage\RedirectTrackingUsageAccumulator)
#6 /srv/mediawiki/php-1.38.0-wmf.1/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#7 /srv/mediawiki/php-1.38.0-wmf.1/extensions/Wikibase/client/includes/Hooks/SiteLinksForDisplayLookup.php(113): MediaWiki\HookContainer\HookContainer->run(string, array)
#8 /srv/mediawiki/php-1.38.0-wmf.1/extensions/Wikibase/client/includes/Hooks/SiteLinksForDisplayLookup.php(104): Wikibase\Client\Hooks\SiteLinksForDisplayLookup->getSiteLinksForItem(Wikibase\DataModel\Entity\Item)
#9 /srv/mediawiki/php-1.38.0-wmf.1/extensions/Wikibase/client/includes/Hooks/SiteLinksForDisplayLookup.php(82): Wikibase\Client\Hooks\SiteLinksForDisplayLookup->getSiteLinksForItemId(Wikibase\DataModel\Entity\ItemId)
#10 /srv/mediawiki/php-1.38.0-wmf.1/extensions/Wikibase/client/includes/Hooks/LangLinkHandler.php(266): Wikibase\Client\Hooks\SiteLinksForDisplayLookup->getSiteLinksForPageTitle(Title)
#11 /srv/mediawiki/php-1.38.0-wmf.1/extensions/Wikibase/client/includes/Hooks/LangLinkHandler.php(287): Wikibase\Client\Hooks\LangLinkHandler->getEffectiveRepoLinks(Title, ParserOutput)
#12 /srv/mediawiki/php-1.38.0-wmf.1/extensions/Wikibase/client/includes/Hooks/ParserOutputUpdateHookHandler.php(85): Wikibase\Client\Hooks\LangLinkHandler->addLinksFromRepository(Title, ParserOutput)
#13 /srv/mediawiki/php-1.38.0-wmf.1/extensions/Wikibase/client/includes/Hooks/ParserOutputUpdateHookHandler.php(67): Wikibase\Client\Hooks\ParserOutputUpdateHookHandler->doContentAlterParserOutput(Title, ParserOutput)
#14 /srv/mediawiki/php-1.38.0-wmf.1/includes/HookContainer/HookContainer.php(160): Wikibase\Client\Hooks\ParserOutputUpdateHookHandler->onContentAlterParserOutput(WikitextContent, Title, ParserOutput)
#15 /srv/mediawiki/php-1.38.0-wmf.1/includes/HookContainer/HookRunner.php(1203): MediaWiki\HookContainer\HookContainer->run(string, array)
#16 /srv/mediawiki/php-1.38.0-wmf.1/includes/content/AbstractContent.php(552): MediaWiki\HookContainer\HookRunner->onContentAlterParserOutput(WikitextContent, Title, ParserOutput)
#17 /srv/mediawiki/php-1.38.0-wmf.1/includes/Revision/RenderedRevision.php(266): AbstractContent->getParserOutput(Title, integer, ParserOptions, boolean)
#18 /srv/mediawiki/php-1.38.0-wmf.1/includes/Revision/RenderedRevision.php(235): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(WikitextContent, boolean)
#19 /srv/mediawiki/php-1.38.0-wmf.1/includes/Revision/RevisionRenderer.php(217): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string, array)
#20 /srv/mediawiki/php-1.38.0-wmf.1/includes/Revision/RevisionRenderer.php(154): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)
#21 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(MediaWiki\Revision\RenderedRevision, array)
#22 /srv/mediawiki/php-1.38.0-wmf.1/includes/Revision/RenderedRevision.php(197): call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)
#23 /srv/mediawiki/php-1.38.0-wmf.1/includes/poolcounter/PoolWorkArticleView.php(137): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#24 /srv/mediawiki/php-1.38.0-wmf.1/includes/poolcounter/PoolCounterWork.php(162): PoolWorkArticleView->doWork()
#25 /srv/mediawiki/php-1.38.0-wmf.1/includes/page/ParserOutputAccess.php(281): PoolCounterWork->execute()
#26 /srv/mediawiki/php-1.38.0-wmf.1/includes/page/Article.php(697): MediaWiki\Page\ParserOutputAccess->getParserOutput(WikiPage, ParserOptions, MediaWiki\Revision\RevisionStoreCacheRecord, integer)
#27 /srv/mediawiki/php-1.38.0-wmf.1/includes/page/Article.php(509): Article->generateContentOutput(User, ParserOptions, integer, OutputPage, array)
#28 /srv/mediawiki/php-1.38.0-wmf.1/includes/actions/ViewAction.php(74): Article->view()
#29 /srv/mediawiki/php-1.38.0-wmf.1/includes/MediaWiki.php(538): ViewAction->show()
#30 /srv/mediawiki/php-1.38.0-wmf.1/includes/MediaWiki.php(320): MediaWiki->performAction(Article, Title)
#31 /srv/mediawiki/php-1.38.0-wmf.1/includes/MediaWiki.php(925): MediaWiki->performRequest()
#32 /srv/mediawiki/php-1.38.0-wmf.1/includes/MediaWiki.php(559): MediaWiki->main()
#33 /srv/mediawiki/php-1.38.0-wmf.1/index.php(53): MediaWiki->run()
#34 /srv/mediawiki/php-1.38.0-wmf.1/index.php(46): wfIndexMain()
#35 /srv/mediawiki/w/index.php(3): require(string)
#36 {main}
Impact

47 occurrences since 2021-09-25 (1.38.0-wmf.1).

Notes

Event Timeline

Ladsgroup lowered the priority of this task from Unbreak Now! to Needs Triage.Sep 28 2021, 2:32 PM

Change 724710 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/WikimediaBadges@master] Handle missing items in WikibaseClientSiteLinksForItemHandler

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

Change 724710 merged by jenkins-bot:

[mediawiki/extensions/WikimediaBadges@master] Handle missing items in WikibaseClientSiteLinksForItemHandler

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

Change 724560 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/WikimediaBadges@wmf/1.38.0-wmf.1] Handle missing items in WikibaseClientSiteLinksForItemHandler

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

Change 724561 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/WikimediaBadges@wmf/1.38.0-wmf.2] Handle missing items in WikibaseClientSiteLinksForItemHandler

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

Change 724560 merged by jenkins-bot:

[mediawiki/extensions/WikimediaBadges@wmf/1.38.0-wmf.1] Handle missing items in WikibaseClientSiteLinksForItemHandler

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

Change 724561 merged by jenkins-bot:

[mediawiki/extensions/WikimediaBadges@wmf/1.38.0-wmf.2] Handle missing items in WikibaseClientSiteLinksForItemHandler

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

Mentioned in SAL (#wikimedia-operations) [2021-09-29T16:24:01Z] <lucaswerkmeister-wmde@deploy1002> Synchronized php-1.38.0-wmf.1/extensions/WikimediaBadges/: Backport: [[gerrit:724560|Handle missing items in WikibaseClientSiteLinksForItemHandler (T291953)]] (duration: 01m 10s)

Mentioned in SAL (#wikimedia-operations) [2021-09-29T16:25:21Z] <lucaswerkmeister-wmde@deploy1002> Synchronized php-1.38.0-wmf.2/extensions/WikimediaBadges/: Backport: [[gerrit:724561|Handle missing items in WikibaseClientSiteLinksForItemHandler (T291953)]] (duration: 01m 08s)

Doesn’t seem to be happening anymore, I think we can close this.

Screenshot 2021-10-13 at 11-16-12 mediawiki - Elastic.png (220×678 px, 10 KB)