Page MenuHomePhabricator

Fatal error on some Wikidata pages: "Call to getRepresentations() on a non-object"
Closed, ResolvedPublic

Description

Error

Request ID: W9SiTwpAIC0AAFDHQdQAAABT

message
BadMethodCallException: Call to a member function getRepresentations
trace
#0 /srv/mediawiki/php-1.33.0-wmf.1/extensions/WikibaseLexeme/src/MediaWiki/EntityLinkFormatters/FormLinkFormatter.php(63): Wikibase\Lexeme\MediaWiki\EntityLinkFormatters\FormLinkFormatter->getRepresentations(Wikibase\Lexeme\Domain\Model\FormId)
#1 /srv/mediawiki/php-1.33.0-wmf.1/extensions/Wikibase/repo/includes/Hooks/HtmlPageLinkRendererBeginHookHandler.php(253): Wikibase\Lexeme\MediaWiki\EntityLinkFormatters\FormLinkFormatter->getHtml(Wikibase\Lexeme\Domain\Model\FormId, NULL)
#2 /srv/mediawiki/php-1.33.0-wmf.1/extensions/Wikibase/repo/includes/Hooks/HtmlPageLinkRendererBeginHookHandler.php(141): Wikibase\Repo\Hooks\HtmlPageLinkRendererBeginHookHandler->doHtmlPageLinkRendererBegin(MediaWiki\Linker\LinkRenderer, Title, HtmlArmor, array, RequestContext, NULL)
#3 /srv/mediawiki/php-1.33.0-wmf.1/includes/Hooks.php(174): Wikibase\Repo\Hooks\HtmlPageLinkRendererBeginHookHandler::onHtmlPageLinkRendererBegin(MediaWiki\Linker\LinkRenderer, Title, HtmlArmor, array, array, NULL)
#4 /srv/mediawiki/php-1.33.0-wmf.1/includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
#5 /srv/mediawiki/php-1.33.0-wmf.1/includes/linker/LinkRenderer.php(180): Hooks::run(string, array)
#6 /srv/mediawiki/php-1.33.0-wmf.1/includes/linker/LinkRenderer.php(251): MediaWiki\Linker\LinkRenderer->runBeginHook(Title, HtmlArmor, array, array, boolean)
#7 /srv/mediawiki/php-1.33.0-wmf.1/includes/parser/LinkHolderArray.php(401): MediaWiki\Linker\LinkRenderer->makePreloadedLink(Title, HtmlArmor, string, array, array)
#8 /srv/mediawiki/php-1.33.0-wmf.1/includes/parser/LinkHolderArray.php(272): LinkHolderArray->replaceInternal(string)
#9 /srv/mediawiki/php-1.33.0-wmf.1/includes/parser/Parser.php(4991): LinkHolderArray->replace(string)
#10 /srv/mediawiki/php-1.33.0-wmf.1/includes/parser/Parser.php(1417): Parser->replaceLinkHolders(string)
#11 /srv/mediawiki/php-1.33.0-wmf.1/includes/parser/Parser.php(485): Parser->internalParseHalfParsed(string, boolean, boolean)
#12 /srv/mediawiki/php-1.33.0-wmf.1/includes/content/WikitextContent.php(341): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#13 /srv/mediawiki/php-1.33.0-wmf.1/includes/content/AbstractContent.php(517): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
#14 /srv/mediawiki/php-1.33.0-wmf.1/includes/Revision/RenderedRevision.php(243): AbstractContent->getParserOutput(Title, integer, ParserOptions, boolean)
#15 /srv/mediawiki/php-1.33.0-wmf.1/includes/Revision/RenderedRevision.php(211): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(WikitextContent, boolean)
#16 /srv/mediawiki/php-1.33.0-wmf.1/includes/Revision/RevisionRenderer.php(168): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string)
#17 /srv/mediawiki/php-1.33.0-wmf.1/includes/Revision/RevisionRenderer.php(121): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)
#18 [internal function]: Closure$MediaWiki\Revision\RevisionRenderer::getRenderedRevision#2(MediaWiki\Revision\RenderedRevision, array)
#19 /srv/mediawiki/php-1.33.0-wmf.1/includes/Revision/RenderedRevision.php(175): call_user_func(Closure$MediaWiki\Revision\RevisionRenderer::getRenderedRevision#2;2739, MediaWiki\Revision\RenderedRevision, array)
#20 /srv/mediawiki/php-1.33.0-wmf.1/includes/poolcounter/PoolWorkArticleView.php(194): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#21 /srv/mediawiki/php-1.33.0-wmf.1/includes/poolcounter/PoolCounterWork.php(123): PoolWorkArticleView->doWork()
#22 /srv/mediawiki/php-1.33.0-wmf.1/includes/page/WikiPage.php(1230): PoolCounterWork->execute()
#23 /srv/mediawiki/php-1.33.0-wmf.1/includes/diff/DifferenceEngine.php(920): WikiPage->getParserOutput(ParserOptions, integer)
#24 /srv/mediawiki/php-1.33.0-wmf.1/includes/diff/DifferenceEngine.php(881): DifferenceEngine->getParserOutput(WikiPage, Revision)
#25 /srv/mediawiki/php-1.33.0-wmf.1/includes/diff/DifferenceEngine.php(709): DifferenceEngine->renderNewRevision()
#26 /srv/mediawiki/php-1.33.0-wmf.1/includes/page/Article.php(932): DifferenceEngine->showDiffPage(boolean)
#27 /srv/mediawiki/php-1.33.0-wmf.1/includes/page/Article.php(616): Article->showDiffPage()
#28 /srv/mediawiki/php-1.33.0-wmf.1/includes/actions/ViewAction.php(68): Article->view()
#29 /srv/mediawiki/php-1.33.0-wmf.1/includes/MediaWiki.php(501): ViewAction->show()
#30 /srv/mediawiki/php-1.33.0-wmf.1/includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title)
#31 /srv/mediawiki/php-1.33.0-wmf.1/includes/MediaWiki.php(860): MediaWiki->performRequest()
#32 /srv/mediawiki/php-1.33.0-wmf.1/includes/MediaWiki.php(517): MediaWiki->main()

Impact

Some Wikidata.org urls cannot be viewed by users. They receive a fatal PHP error, and produce HTTP 5xx responses that cannot be cached.

Example at https://www.wikidata.org/w/index.php?title=Wikidata_talk%3ALexicographical_data&type=revision&diff=749258955&oldid=749093415.

Notes

This started yesterday with the deployment of 1.33-wmf.1.

Event Timeline

Krinkle triaged this task as Unbreak Now! priority.Oct 27 2018, 6:22 PM
Krinkle created this task.
Restricted Application added a project: Wikidata. · View Herald TranscriptOct 27 2018, 6:22 PM
Restricted Application added subscribers: Liuxinyu970226, TerraCodes. · View Herald Transcript

I am looking at this since I see failing CI tests for Math and can't explain why...
For the example, it is interesting that the error occurs when navigating to
https://www.wikidata.org/w/index.php?oldid=749093415
which brings you the revision page with the following header:

Revision as of 21:36, 19 September 2018 by Nikki (talk | contribs) (→‎Should we even add proper nouns at all?)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Clicking on the first (diff) and third (diff) in the second line generates the error but not the second (diff) link.

Update: I changed the settings of my user and checked

  • Do not show page content below diffs

now
https://www.wikidata.org/w/index.php?title=Wikidata_talk%3ALexicographical_data&type=revision&diff=749258955&oldid=749093415
displays fine.

Physikerwelt added a comment.EditedOct 27 2018, 7:43 PM

Recheck fixed the CI tests for math. I guess this issue is unrelated. I won't investigate this issue further.

Addshore updated the task description. (Show Details)Oct 28 2018, 9:36 AM
Addshore lowered the priority of this task from Unbreak Now! to High.Oct 28 2018, 9:54 AM

The call count is low so I'm going to switch this from an UBN to a High as this can be fixed next week (rather than on a Sunday)

Change 470590 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/extensions/WikibaseLexeme@master] Return empty TermList as representations when it can't find the form

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

Restricted Application added a project: User-Ladsgroup. · View Herald TranscriptOct 30 2018, 1:06 PM

Change 470590 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Return empty TermList as representations when it can't find the form

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

Addshore moved this task from incoming to in progress on the Wikidata board.Oct 31 2018, 5:07 PM
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:08 PM