Page MenuHomePhabricator

Various Wikibase APIs can fatal with "Call to hasSlot() on null" (from WikiPageEntityRevisionLookup.php)
Open, Needs TriagePublic

Description

Error

Request URL: POST www.wikidata.org /w/api.php
Request ID: XOVStQpAMEIAAFu6vqEAAABM

message
BadMethodCallException:
Call to a member function hasSlot() on a non-object (null)
trace for Api/ModifyEntity
#0 /srv/mediawiki/php-1.34.0-wmf.8/extensions/Wikibase/lib/includes/Store/Sql/WikiPageEntityRevisionLookup.php(132): Wikibase\Lib\Store\Sql\WikiPageEntityRevisionLookup->loadEntity(stdClass, string)
#1 /srv/mediawiki/php-1.34.0-wmf.8/extensions/Wikibase/lib/includes/Store/DispatchingEntityRevisionLookup.php(59): Wikibase\Lib\Store\Sql\WikiPageEntityRevisionLookup->getEntityRevision(Wikibase\DataModel\Entity\ItemId, integer, string)
#2 /srv/mediawiki/php-1.34.0-wmf.8/extensions/Wikibase/lib/includes/Store/TypeDispatchingEntityRevisionLookup.php(55): Wikibase\Lib\Store\DispatchingEntityRevisionLookup->getEntityRevision(Wikibase\DataModel\Entity\ItemId, integer, string)
#3 /srv/mediawiki/php-1.34.0-wmf.8/extensions/Wikibase/repo/includes/Api/ModifyEntity.php(192): Wikibase\Lib\Store\TypeDispatchingEntityRevisionLookup->getEntityRevision(Wikibase\DataModel\Entity\ItemId, integer, string)
#4 /srv/mediawiki/php-1.34.0-wmf.8/extensions/Wikibase/repo/includes/Api/EditEntity.php(252): Wikibase\Repo\Api\ModifyEntity->applyChangeOp(Wikibase\Repo\ChangeOp\ChangeOps, Wikibase\DataModel\Entity\Item)
#5 /srv/mediawiki/php-1.34.0-wmf.8/extensions/Wikibase/repo/includes/Api/ModifyEntity.php(298): Wikibase\Repo\Api\EditEntity->modifyEntity(Wikibase\DataModel\Entity\Item, Wikibase\Repo\ChangeOp\ChangeOps, array)
#6 /srv/mediawiki/php-1.34.0-wmf.8/includes/api/ApiMain.php(1595): Wikibase\Repo\Api\ModifyEntity->execute()
#7 /srv/mediawiki/php-1.34.0-wmf.8/includes/api/ApiMain.php(531): ApiMain->executeAction()
#8 /srv/mediawiki/php-1.34.0-wmf.8/includes/api/ApiMain.php(502): ApiMain->executeActionWithErrorHandling()
#9 /srv/mediawiki/php-1.34.0-wmf.8/api.php(87): ApiMain->execute()
#10 /srv/mediawiki/w/api.php(3): include(string)
trace for Api/SetClaim
0 /srv/mediawiki/php-1.34.0-wmf.6/extensions/Wikibase/lib/includes/Store/Sql/WikiPageEntityRevisionLookup.php(132): Wikibase\Lib\Store\Sql\WikiPageEntityRevisionLookup->loadEntity(stdClass, string)
#1 /srv/mediawiki/php-1.34.0-wmf.6/extensions/Wikibase/lib/includes/Store/DispatchingEntityRevisionLookup.php(59): Wikibase\Lib\Store\Sql\WikiPageEntityRevisionLookup->getEntityRevision(Wikibase\DataModel\Entity\ItemId, integer, string)
#2 /srv/mediawiki/php-1.34.0-wmf.6/extensions/Wikibase/lib/includes/Store/TypeDispatchingEntityRevisionLookup.php(55): Wikibase\Lib\Store\DispatchingEntityRevisionLookup->getEntityRevision(Wikibase\DataModel\Entity\ItemId, integer, string)
#3 /srv/mediawiki/php-1.34.0-wmf.6/extensions/Wikibase/repo/includes/EditEntity/MediawikiEditEntity.php(235): Wikibase\Lib\Store\TypeDispatchingEntityRevisionLookup->getEntityRevision(Wikibase\DataModel\Entity\ItemId, integer, string)
#4 /srv/mediawiki/php-1.34.0-wmf.6/extensions/Wikibase/repo/includes/EditEntity/MediawikiEditEntity.php(662): Wikibase\Repo\EditEntity\MediawikiEditEntity->getLatestRevision()
#5 /srv/mediawiki/php-1.34.0-wmf.6/extensions/Wikibase/repo/includes/EditEntity/StatsdSaveTimeRecordingEditEntity.php(73): Wikibase\Repo\EditEntity\MediawikiEditEntity->attemptSave(Wikibase\DataModel\Entity\Item, string, integer, string, boolean)
#6 /srv/mediawiki/php-1.34.0-wmf.6/extensions/Wikibase/repo/includes/Api/EntitySavingHelper.php(351): Wikibase\Repo\EditEntity\StatsdSaveTimeRecordingEditEntity->attemptSave(Wikibase\DataModel\Entity\Item, string, integer, string)
#7 /srv/mediawiki/php-1.34.0-wmf.6/extensions/Wikibase/repo/includes/Api/SetClaim.php(137): Wikibase\Repo\Api\EntitySavingHelper->attemptSaveEntity(Wikibase\DataModel\Entity\Item, string)
#8 /srv/mediawiki/php-1.34.0-wmf.6/includes/api/ApiMain.php(1593): Wikibase\Repo\Api\SetClaim->execute()
#9 /srv/mediawiki/php-1.34.0-wmf.6/includes/api/ApiMain.php(531): ApiMain->executeAction()
#10 /srv/mediawiki/php-1.34.0-wmf.6/includes/api/ApiMain.php(502): ApiMain->executeActionWithErrorHandling()
#11 /srv/mediawiki/php-1.34.0-wmf.6/api.php(87): ApiMain->execute()
#12 /srv/mediawiki/w/api.php(3): include(string)
#13 {main}

Impact

Some actions that API users are trying to perform are aborted with this fatal error.

The rate is relatively low, which suggests it might be due to being specific to certain pages or certain users only.

Notes

Since since at least 1.34-wmf.3.