Last modified: 2014-09-04 15:54:50 UTC
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...')
I trigger this error when trying to add a label to https://www.wikidata.org/wiki/Q17831325 repored in project chat: https://www.wikidata.org/wiki/Wikidata:Project_chat#Huh.3F
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