Page MenuHomePhabricator

Wikibase\DataModel\Entity\EntityIdParsingException: The serialization "Q42902012 " is not recognized by the configured id builders
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
  • mwversion: 1.45.0-wmf.23
  • timestamp: 2025-10-20T13:10:35.184Z
  • phpversion: 8.1.33
  • reqId: 487ae5b8-39c9-4903-9c6d-306d78d1a12b
  • Find reqId in Logstash
normalized_message
[{reqId}] {exception_url}   Wikibase\DataModel\Entity\EntityIdParsingException: The serialization "Q42902012 " is not recognized by the configured id builders
FrameLocationCall
from/srv/mediawiki/php-1.45.0-wmf.23/extensions/Wikibase/lib/packages/wikibase/data-model/src/Entity/DispatchingEntityIdParser.php(52)
#0/srv/mediawiki/php-1.45.0-wmf.23/extensions/Wikibase/client/includes/DataAccess/Scribunto/WikibaseLibrary.php(507)Wikibase\DataModel\Entity\DispatchingEntityIdParser->parse(string)
#1/srv/mediawiki/php-1.45.0-wmf.23/extensions/Scribunto/includes/Engines/LuaSandbox/LuaSandboxCallback.php(31)Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary->addStatementWithQualOrRefUsage(string, string)
#2[internal function]MediaWiki\Extension\Scribunto\Engines\LuaSandbox\LuaSandboxCallback->__call(string, array)
#3/srv/mediawiki/php-1.45.0-wmf.23/extensions/Scribunto/includes/Engines/LuaSandbox/LuaSandboxInterpreter.php(137)LuaSandboxFunction->call(LuaSandboxFunction)
#4/srv/mediawiki/php-1.45.0-wmf.23/extensions/Scribunto/includes/Engines/LuaCommon/LuaEngine.php(294)MediaWiki\Extension\Scribunto\Engines\LuaSandbox\LuaSandboxInterpreter->callFunction(LuaSandboxFunction, LuaSandboxFunction)
#5/srv/mediawiki/php-1.45.0-wmf.23/extensions/Scribunto/includes/Engines/LuaCommon/LuaModule.php(76)MediaWiki\Extension\Scribunto\Engines\LuaCommon\LuaEngine->executeFunctionChunk(LuaSandboxFunction, MediaWiki\Parser\PPTemplateFrame_Hash)
#6/srv/mediawiki/php-1.45.0-wmf.23/extensions/Scribunto/includes/Hooks.php(163)MediaWiki\Extension\Scribunto\Engines\LuaCommon\LuaModule->invoke(string, MediaWiki\Parser\PPTemplateFrame_Hash)
#7/srv/mediawiki/php-1.45.0-wmf.23/includes/parser/Parser.php(3408)MediaWiki\Extension\Scribunto\Hooks->invokeHook(MediaWiki\Parser\Parser, MediaWiki\Parser\PPTemplateFrame_Hash, array)
#8/srv/mediawiki/php-1.45.0-wmf.23/includes/parser/Parser.php(3064)MediaWiki\Parser\Parser->callParserFunction(MediaWiki\Parser\PPTemplateFrame_Hash, string, array, bool)
#9/srv/mediawiki/php-1.45.0-wmf.23/includes/parser/PPFrame_Hash.php(266)MediaWiki\Parser\Parser->braceSubstitution(array, MediaWiki\Parser\PPTemplateFrame_Hash)
#10/srv/mediawiki/php-1.45.0-wmf.23/includes/parser/Parser.php(3264)MediaWiki\Parser\PPFrame_Hash->expand(MediaWiki\Parser\PPNode_Hash_Tree)
#11/srv/mediawiki/php-1.45.0-wmf.23/includes/parser/PPFrame_Hash.php(266)MediaWiki\Parser\Parser->braceSubstitution(array, MediaWiki\Parser\PPFrame_Hash)
#12/srv/mediawiki/php-1.45.0-wmf.23/includes/parser/Parser.php(2886)MediaWiki\Parser\PPFrame_Hash->expand(MediaWiki\Parser\PPNode_Hash_Tree, int)
#13/srv/mediawiki/php-1.45.0-wmf.23/includes/parser/Parser.php(1521)MediaWiki\Parser\Parser->replaceVariables(string)
#14/srv/mediawiki/php-1.45.0-wmf.23/includes/parser/Parser.php(779)MediaWiki\Parser\Parser->internalParse(string, bool, bool)
#15/srv/mediawiki/php-1.45.0-wmf.23/extensions/Cite/src/ReferenceListFormatter.php(40)MediaWiki\Parser\Parser->recursiveTagParse(string)
#16/srv/mediawiki/php-1.45.0-wmf.23/extensions/Cite/src/Cite.php(317)Cite\ReferenceListFormatter->formatReferences(MediaWiki\Parser\Parser, array, bool)
#17/srv/mediawiki/php-1.45.0-wmf.23/extensions/Cite/src/Cite.php(230)Cite\Cite->formatReferences(MediaWiki\Parser\Parser, string, null)
#18/srv/mediawiki/php-1.45.0-wmf.23/extensions/Cite/src/Hooks/CiteParserTagHooks.php(75)Cite\Cite->references(MediaWiki\Parser\Parser, string, array)
#19/srv/mediawiki/php-1.45.0-wmf.23/includes/parser/Parser.php(3995)Cite\Hooks\CiteParserTagHooks->references(string, array, MediaWiki\Parser\Parser, MediaWiki\Parser\PPTemplateFrame_Hash)
#20/srv/mediawiki/php-1.45.0-wmf.23/includes/parser/CoreParserFunctions.php(1547)MediaWiki\Parser\Parser->extensionSubstitution(array, MediaWiki\Parser\PPTemplateFrame_Hash)
#21/srv/mediawiki/php-1.45.0-wmf.23/includes/parser/Parser.php(3408)MediaWiki\Parser\CoreParserFunctions::tagObj(MediaWiki\Parser\Parser, MediaWiki\Parser\PPTemplateFrame_Hash, array)
#22/srv/mediawiki/php-1.45.0-wmf.23/includes/parser/Parser.php(3064)MediaWiki\Parser\Parser->callParserFunction(MediaWiki\Parser\PPTemplateFrame_Hash, string, array, bool)
#23/srv/mediawiki/php-1.45.0-wmf.23/includes/parser/PPFrame_Hash.php(266)MediaWiki\Parser\Parser->braceSubstitution(array, MediaWiki\Parser\PPTemplateFrame_Hash)
#24/srv/mediawiki/php-1.45.0-wmf.23/includes/parser/Parser.php(3264)MediaWiki\Parser\PPFrame_Hash->expand(MediaWiki\Parser\PPNode_Hash_Tree)
#25/srv/mediawiki/php-1.45.0-wmf.23/includes/parser/PPFrame_Hash.php(266)MediaWiki\Parser\Parser->braceSubstitution(array, MediaWiki\Parser\PPFrame_Hash)
#26/srv/mediawiki/php-1.45.0-wmf.23/includes/parser/Parser.php(2886)MediaWiki\Parser\PPFrame_Hash->expand(MediaWiki\Parser\PPNode_Hash_Tree, int)
#27/srv/mediawiki/php-1.45.0-wmf.23/includes/parser/Parser.php(1521)MediaWiki\Parser\Parser->replaceVariables(string)
#28/srv/mediawiki/php-1.45.0-wmf.23/includes/parser/Parser.php(608)MediaWiki\Parser\Parser->internalParse(string)
#29/srv/mediawiki/php-1.45.0-wmf.23/includes/content/WikitextContentHandler.php(375)MediaWiki\Parser\Parser->parse(string, MediaWiki\Title\Title, MediaWiki\Parser\ParserOptions, bool, bool, int)
#30/srv/mediawiki/php-1.45.0-wmf.23/includes/content/ContentHandler.php(1698)MediaWiki\Content\WikitextContentHandler->fillParserOutput(MediaWiki\Content\WikitextContent, MediaWiki\Content\Renderer\ContentParseParams, MediaWiki\Parser\ParserOutput)
#31/srv/mediawiki/php-1.45.0-wmf.23/includes/content/Renderer/ContentRenderer.php(67)MediaWiki\Content\ContentHandler->getParserOutput(MediaWiki\Content\WikitextContent, MediaWiki\Content\Renderer\ContentParseParams)
#32/srv/mediawiki/php-1.45.0-wmf.23/includes/Revision/RenderedRevision.php(247)MediaWiki\Content\Renderer\ContentRenderer->getParserOutput(MediaWiki\Content\WikitextContent, MediaWiki\Page\PageIdentityValue, MediaWiki\Revision\RevisionStoreCacheRecord, MediaWiki\Parser\ParserOptions, array)
#33/srv/mediawiki/php-1.45.0-wmf.23/includes/Revision/RenderedRevision.php(219)MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(MediaWiki\Content\WikitextContent, array)
#34/srv/mediawiki/php-1.45.0-wmf.23/includes/Revision/RevisionRenderer.php(223)MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string, array)
#35/srv/mediawiki/php-1.45.0-wmf.23/includes/Revision/RevisionRenderer.php(156)MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, MediaWiki\Parser\ParserOptions, array)
#36/srv/mediawiki/php-1.45.0-wmf.23/includes/Revision/RenderedRevision.php(182)MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(MediaWiki\Revision\RenderedRevision, array)
#37/srv/mediawiki/php-1.45.0-wmf.23/includes/page/ParserOutputAccess.php(586)MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#38/srv/mediawiki/php-1.45.0-wmf.23/includes/page/ParserOutputAccess.php(499)MediaWiki\Page\ParserOutputAccess->renderRevision(MediaWiki\Page\WikiPage, MediaWiki\Parser\ParserOptions, MediaWiki\Revision\RevisionStoreCacheRecord, array, null)
#39/srv/mediawiki/php-1.45.0-wmf.23/includes/page/WikiPage.php(1123)MediaWiki\Page\ParserOutputAccess->getParserOutput(MediaWiki\Page\WikiPage, MediaWiki\Parser\ParserOptions, MediaWiki\Revision\RevisionStoreCacheRecord, array)
#40/srv/mediawiki/php-1.45.0-wmf.23/includes/api/ApiParse.php(176)MediaWiki\Page\WikiPage->getParserOutput(MediaWiki\Parser\ParserOptions, null, bool)
#41/srv/mediawiki/php-1.45.0-wmf.23/includes/poolcounter/PoolCounterWorkViaCallback.php(68)MediaWiki\Api\ApiParse::MediaWiki\Api\{closure}()
#42/srv/mediawiki/php-1.45.0-wmf.23/includes/poolcounter/PoolCounterWork.php(159)MediaWiki\PoolCounter\PoolCounterWorkViaCallback->doWork()
#43/srv/mediawiki/php-1.45.0-wmf.23/includes/api/ApiParse.php(183)MediaWiki\PoolCounter\PoolCounterWork->execute()
#44/srv/mediawiki/php-1.45.0-wmf.23/includes/api/ApiParse.php(889)MediaWiki\Api\ApiParse->getPageParserOutput(MediaWiki\Page\WikiPage, null, MediaWiki\Parser\ParserOptions, bool)
#45/srv/mediawiki/php-1.45.0-wmf.23/includes/api/ApiParse.php(309)MediaWiki\Api\ApiParse->getParsedContent(MediaWiki\Page\WikiPage, MediaWiki\Parser\ParserOptions, bool, null, null, bool)
#46/srv/mediawiki/php-1.45.0-wmf.23/includes/api/ApiMain.php(2036)MediaWiki\Api\ApiParse->execute()
#47/srv/mediawiki/php-1.45.0-wmf.23/includes/api/ApiMain.php(944)MediaWiki\Api\ApiMain->executeAction()
#48/srv/mediawiki/php-1.45.0-wmf.23/includes/api/ApiMain.php(915)MediaWiki\Api\ApiMain->executeActionWithErrorHandling()
#49/srv/mediawiki/php-1.45.0-wmf.23/includes/api/ApiEntryPoint.php(138)MediaWiki\Api\ApiMain->execute()
#50/srv/mediawiki/php-1.45.0-wmf.23/includes/MediaWikiEntryPoint.php(184)MediaWiki\Api\ApiEntryPoint->execute()
#51/srv/mediawiki/php-1.45.0-wmf.23/api.php(30)MediaWiki\MediaWikiEntryPoint->run()
#52/srv/mediawiki/w/api.php(3)require(string)
#53{main}
Impact

Affected pages (all on viwiki) cannot be viewed (example). Also, a fair amount of logspam.

Notes

Q42902021 (without the trailing space) appears to be a perfectly ordinary item about a Finnish documentary director and journalist.

Event Timeline

The issue seems to be new in this last week’s train and related to WikibaseClient stuff, so pinging @Ifeatu_Nnaobi_WMDE on the off chance that this is, like (seemingly) T407684, related to T401290: Implement new usage types for qualifiers and references.

One of the other request URLs is /w/rest.php/v1/revision/23601524/with_html, and in /w/rest.php/v1/revision/23601524 I can see the Wikitext containing:

<ref name="Hki-mlk-hist1865-1945-s.115–120">{{Wikidataviite|Q42902012 |Sivu=115–120 |Viitattu=22.5.2019}}</ref>

Is the whitespace inside that {{Wikidataviite}} template call not being stripped anywhere?

…on the off chance that this is … related to T401290: Implement new usage types for qualifiers and references.

Looking at the stack trace and the Git history a bit more closely, I can see that addStatementWithQualOrRefUsage() (frame #1) is a brand new method introduced by Implement new usage types for statement with qualifiers and references, so now I’m almost certain that it’s due to that.

Change #1197274 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Neslihan Turan):

[mediawiki/extensions/Wikibase@master] Revert "Implement new usage types for statement with qualifiers and references"

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

Change #1197276 had a related patch set uploaded (by Neslihan Turan; author: Neslihan Turan):

[mediawiki/extensions/Wikibase@wmf/1.45.0-wmf.23] Revert "Implement new usage types for statement with qualifiers and references"

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

Change #1197276 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@wmf/1.45.0-wmf.23] Revert "Implement new usage types for statement with qualifiers and references"

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

Mentioned in SAL (#wikimedia-operations) [2025-10-20T14:27:50Z] <lucaswerkmeister-wmde@deploy2002> Started scap sync-world: Backport for [[gerrit:1197276|Revert "Implement new usage types for statement with qualifiers and references" (T401290 T407684 T407744)]]

Mentioned in SAL (#wikimedia-operations) [2025-10-20T14:31:56Z] <lucaswerkmeister-wmde@deploy2002> lucaswerkmeister-wmde, neslihanturan: Backport for [[gerrit:1197276|Revert "Implement new usage types for statement with qualifiers and references" (T401290 T407684 T407744)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

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

[mediawiki/extensions/Wikibase@wmf/1.45.0-wmf.23] Restore "Implement new usage types for statement with qualifiers and references"

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

Change #1197281 merged by Lucas Werkmeister (WMDE):

[mediawiki/extensions/Wikibase@wmf/1.45.0-wmf.23] Restore "Implement new usage types for statement with qualifiers and references"

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

Mentioned in SAL (#wikimedia-operations) [2025-10-20T14:46:50Z] <lucaswerkmeister-wmde@deploy2002> Started scap sync-world: Backport for [[gerrit:1197281|Restore "Implement new usage types for statement with qualifiers and references" (T401290 T407684 T407744)]]

Mentioned in SAL (#wikimedia-operations) [2025-10-20T14:51:05Z] <lucaswerkmeister-wmde@deploy2002> lucaswerkmeister-wmde: Backport for [[gerrit:1197281|Restore "Implement new usage types for statement with qualifiers and references" (T401290 T407684 T407744)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-10-20T14:55:31Z] <lucaswerkmeister-wmde@deploy2002> Finished scap sync-world: Backport for [[gerrit:1197281|Restore "Implement new usage types for statement with qualifiers and references" (T401290 T407684 T407744)]] (duration: 08m 43s)

Change #1197289 had a related patch set uploaded (by Seanleong-wmde; author: Seanleong-wmde):

[mediawiki/extensions/Wikibase@master] Revert "Implement new usage types for statement with qualifiers and references". This patch temporary fixes the CQR aspects not found error as well which will be patched asap.

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

Change #1197293 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Neslihan Turan):

[mediawiki/extensions/Wikibase@master] Revert "Implement new usage types for statement with qualifiers and references"

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

Change #1197274 abandoned by Lucas Werkmeister (WMDE):

[mediawiki/extensions/Wikibase@master] Revert "Implement new usage types for statement with qualifiers and references"

Reason:

recreated as I3709641e75 (same change, different Change-Id) so we can cherry-pick it to wmf.23 a second time

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

Change #1197294 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Neslihan Turan):

[mediawiki/extensions/Wikibase@wmf/1.45.0-wmf.23] Revert "Implement new usage types for statement with qualifiers and references"

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

Change #1197294 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@wmf/1.45.0-wmf.23] Revert "Implement new usage types for statement with qualifiers and references"

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

Mentioned in SAL (#wikimedia-operations) [2025-10-20T16:02:30Z] <lucaswerkmeister-wmde@deploy2002> Started scap sync-world: Backport for [[gerrit:1197294|Revert "Implement new usage types for statement with qualifiers and references" (T401290 T407684 T407744)]]

Mentioned in SAL (#wikimedia-operations) [2025-10-20T16:07:13Z] <lucaswerkmeister-wmde@deploy2002> lucaswerkmeister-wmde: Backport for [[gerrit:1197294|Revert "Implement new usage types for statement with qualifiers and references" (T401290 T407684 T407744)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-10-20T16:19:14Z] <lucaswerkmeister-wmde@deploy2002> Finished scap sync-world: Backport for [[gerrit:1197294|Revert "Implement new usage types for statement with qualifiers and references" (T401290 T407684 T407744)]] (duration: 16m 43s)

Lucas_Werkmeister_WMDE lowered the priority of this task from Unbreak Now! to Needs Triage.Oct 20 2025, 4:26 PM

Lowering priority as this should hopefully be fixed for now; I’ll leave the verification to the Wikidata Integration in Wikimedia projects team.

Change #1197608 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Neslihan Turan):

[mediawiki/extensions/Wikibase@wmf/1.45.0-wmf.24] Revert "Implement new usage types for statement with qualifiers and references"

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

Change #1197608 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@wmf/1.45.0-wmf.24] Revert "Implement new usage types for statement with qualifiers and references"

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

Mentioned in SAL (#wikimedia-operations) [2025-10-21T10:17:13Z] <lucaswerkmeister-wmde@deploy2002> Started scap sync-world: Backport for [[gerrit:1197608|Revert "Implement new usage types for statement with qualifiers and references" (T401290 T407684 T407744)]]

Mentioned in SAL (#wikimedia-operations) [2025-10-21T10:21:29Z] <lucaswerkmeister-wmde@deploy2002> lucaswerkmeister-wmde: Backport for [[gerrit:1197608|Revert "Implement new usage types for statement with qualifiers and references" (T401290 T407684 T407744)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-10-21T10:26:29Z] <lucaswerkmeister-wmde@deploy2002> Finished scap sync-world: Backport for [[gerrit:1197608|Revert "Implement new usage types for statement with qualifiers and references" (T401290 T407684 T407744)]] (duration: 09m 15s)

Change #1197293 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Revert "Implement new usage types for statement with qualifiers and references"

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

Change #1197626 had a related patch set uploaded (by Joely Rooke WMDE; author: Joely Rooke WMDE):

[mediawiki/extensions/Wikibase@master] Revert^2 "Implement new usage types for statement with qualifiers and references"

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

Change #1197626 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Revert^2 "Implement new usage types for statement with qualifiers and references"

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

The fix for this now has been deployed, along with the original T401290 code, to all wikis. I have verified the example kindly provided before are still working, so have closed the ticket. If anyone sees the issue reoccurring, or finds a new bug related to statements, qualifiers or references in lua, please reopen the ticket and ping me : )