Page MenuHomePhabricator

Call to a member function getEntity() on a non-object in EditEntity.php on line 490
Closed, ResolvedPublic

Description

Fatal error: Call to a member function getEntity() on a non-object at /usr/local/apache/common-local/php-1.24wmf19/extensions/Wikidata/extensions/Wikibase/repo/includes/EditEntity.php on line 490

#0 /usr/local/apache/common-local/php-1.24wmf19/extensions/Wikidata/extensions/Wikibase/repo/includes/EditEntity.php(490): Wikibase\EditEntity::fixEditConflict()
#1 /usr/local/apache/common-local/php-1.24wmf19/extensions/Wikidata/extensions/Wikibase/repo/includes/EditEntity.php(787): Wikibase\EditEntity->fixEditConflict()
#2 /usr/local/apache/common-local/php-1.24wmf19/extensions/Wikidata/extensions/Wikibase/repo/includes/EditEntity.php(685): Wikibase\EditEntity->applyPreSaveChecks()
#3 /usr/local/apache/common-local/php-1.24wmf19/extensions/Wikidata/extensions/Wikibase/repo/includes/api/ApiWikibase.php(462): Wikibase\EditEntity->attemptSave('/* wbcreateclai...', 2, '64e050852366237...')
#4 /usr/local/apache/common-local/php-1.24wmf19/extensions/Wikidata/extensions/Wikibase/repo/includes/api/ModifyClaim.php(68): Wikibase\Api\ApiWikibase->attemptSaveEntity(Object(Wikibase\DataModel\Entity\Item), Object(Wikibase\Summary), 2)
#5 /usr/local/apache/common-local/php-1.24wmf19/extensions/Wikidata/extensions/Wikibase/repo/includes/api/CreateClaim.php(78): Wikibase\Api\ModifyClaim->saveChanges(Object(Wikibase\DataModel\Entity\Item), Object(Wikibase\Summary))
#6 /usr/local/apache/common-local/php-1.24wmf19/includes/api/ApiMain.php(929): Wikibase\Api\CreateClaim->execute()
#7 /usr/local/apache/common-local/php-1.24wmf19/includes/api/ApiMain.php(363): ApiMain->executeAction()
#8 /usr/local/apache/common-local/php-1.24wmf19/includes/api/ApiMain.php(334): ApiMain->executeActionWithErrorHandling()
#9 /usr/local/apache/common-local/php-1.24wmf19/api.php(85): ApiMain->execute()
#10 /usr/local/apache/common-local/w/api.php(3): require('/usr/local/apac...')


Version: unspecified
Severity: normal
Whiteboard: u=dev c=backend p=0

Details

Reference
bz70347

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:44 AM
bzimport set Reference to bz70347.
bzimport added a subscriber: Unknown Object (MLST).

problem is that this item is missing in the wb_entity_per_page table which is used to find the revision for the item (and check for edit conflict).

we have a maintenance script to repair this inconsistency that we run periodically. I ran that now and that fixes the problem.

It would definitely be nice to solve the issue why this happens, and if it does, repair in a better way.

reopening, as I think we make the code more robust and handle this situation better.

see bug 70400

and then would also like an exception to be thrown instead of a fatal in EditEntity

Change 158389 had a related patch set uploaded by Daniel Kinzler:
Graceful handling of failures to load latest rev

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

Change 158389 merged by jenkins-bot:
Graceful handling of failures to load latest rev

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