Page MenuHomePhabricator

WikiPage: "Could not find text for current revision"
Closed, ResolvedPublic

Description

This is hitting wikidata right now:

2015-03-25 19:05:15 mw1146 wikidatawiki: [36d69e93] /w/api.php   MWException from line 1783 of /srv/mediawiki/php-1.25wmf22/includes/page/WikiPage.php: Could not find text for current revision 206713844.
#0 /srv/mediawiki/php-1.25wmf22/extensions/Wikidata/extensions/Wikibase/repo/includes/store/sql/WikiPageEntityStore.php(222): WikiPage->doEditContent()
#1 /srv/mediawiki/php-1.25wmf22/extensions/Wikidata/extensions/Wikibase/repo/includes/store/sql/WikiPageEntityStore.php(132): Wikibase\Repo\Store\WikiPageEntityStore->saveEntityContent()
#2 /srv/mediawiki/php-1.25wmf22/extensions/Wikidata/extensions/Wikibase/repo/includes/EditEntity.php(703): Wikibase\Repo\Store\WikiPageEntityStore->saveEntity()
#3 /srv/mediawiki/php-1.25wmf22/extensions/Wikidata/extensions/Wikibase/repo/includes/api/ApiWikibase.php(415): Wikibase\EditEntity->attemptSave()
#4 /srv/mediawiki/php-1.25wmf22/extensions/Wikidata/extensions/Wikibase/repo/includes/api/ModifyClaim.php(68): Wikibase\Api\ApiWikibase->attemptSaveEntity()
#5 /srv/mediawiki/php-1.25wmf22/extensions/Wikidata/extensions/Wikibase/repo/includes/api/CreateClaim.php(76): Wikibase\Api\ModifyClaim->saveChanges()
#6 /srv/mediawiki/php-1.25wmf22/includes/api/ApiMain.php(1037): Wikibase\Api\CreateClaim->execute()
#7 /srv/mediawiki/php-1.25wmf22/includes/api/ApiMain.php(394): ApiMain->executeAction()
#8 /srv/mediawiki/php-1.25wmf22/includes/api/ApiMain.php(367): ApiMain->executeActionWithErrorHandling()
#9 /srv/mediawiki/php-1.25wmf22/api.php(88): ApiMain->execute()
#10 /srv/mediawiki/w/api.php(3): include()
#11 {main}

Probably caused by 3c2bc32ae1775f5e875958b62d7181b4b5cfe24e

Event Timeline

hoo raised the priority of this task from to High.
hoo updated the task description. (Show Details)
hoo added a project: MediaWiki-Core-Team.
hoo added subscribers: hoo, aaron, aude and 2 others.

Change 199804 had a related patch set uploaded (by Aaron Schulz):
Added a new DB_* constant to complement DB_(MASTER|SLAVE)

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

Change 199819 had a related patch set uploaded (by Aaron Schulz):
Fixed the usage of $flags in loadLastEdit()

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

Change 199819 merged by jenkins-bot:
Fixed the usage of $flags in loadLastEdit()

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

Just seemed to have hit this bug. Output from pywikibot:

>>> Miklagard <<<
Adding P641 --> [[wikidata:Q5377]]
ERROR: Detected MediaWiki API exception MWException; raising
ERROR: internal_api_error_MWException: [4d8e0dcc] Exception Caught: Could not fi
nd text for current revision 209068335.
Traceback (most recent call last):
  File "C:\pywikibot\coredev\pywikibot\bot.py", line 1490, in run
    self.treat(page, item)
  File ".\scripts\claimit.py", line 131, in treat
    claim.addSource(source, bot=True)
  File "C:\pywikibot\coredev\pywikibot\page.py", line 4083, in addSource
    self.addSources([claim], **kwargs)
  File "C:\pywikibot\coredev\pywikibot\page.py", line 4092, in addSources
    data = self.repo.editSource(self, claims, new=True, **kwargs)
  File "C:\pywikibot\coredev\pywikibot\site.py", line 1057, in callee
    return fn(self, *args, **kwargs)
  File "C:\pywikibot\coredev\pywikibot\site.py", line 5747, in editSource
    data = req.submit()
  File "C:\pywikibot\coredev\pywikibot\data\api.py", line 1321, in submit
    raise APIMWException(class_name, info, **result["error"])
APIMWException: internal_api_error_MWException: [4d8e0dcc] Exception Caught: Cou
ld not find text for current revision 209068335.

Take a look at https://www.wikidata.org/w/index.php?title=Q18088313&action=history . The bot does the edit (that works). Tries to retrieve the new revision (209068335) and runs into this exception.

stacktrace for the error that multichill got:

/w/api.php MWException from line 1783 of /srv/mediawiki/php-1.25wmf23/includes/page/WikiPage.php: Could not find text for current revision 209068335.
#0 /srv/mediawiki/php-1.25wmf23/extensions/Wikidata/extensions/Wikibase/repo/includes/store/sql/WikiPageEntityStore.php(222): WikiPage->doEditContent()
#1 /srv/mediawiki/php-1.25wmf23/extensions/Wikidata/extensions/Wikibase/repo/includes/store/sql/WikiPageEntityStore.php(132): Wikibase\Repo\Store\WikiPageEntityStore->saveEntityContent()
#2 /srv/mediawiki/php-1.25wmf23/extensions/Wikidata/extensions/Wikibase/repo/includes/EditEntity.php(703): Wikibase\Repo\Store\WikiPageEntityStore->saveEntity()
#3 /srv/mediawiki/php-1.25wmf23/extensions/Wikidata/extensions/Wikibase/repo/includes/api/ApiWikibase.php(415): Wikibase\EditEntity->attemptSave()
#4 /srv/mediawiki/php-1.25wmf23/extensions/Wikidata/extensions/Wikibase/repo/includes/api/ModifyClaim.php(68): Wikibase\Api\ApiWikibase->attemptSaveEntity()
#5 /srv/mediawiki/php-1.25wmf23/extensions/Wikidata/extensions/Wikibase/repo/includes/api/SetReference.php(88): Wikibase\Api\ModifyClaim->saveChanges()
#6 /srv/mediawiki/php-1.25wmf23/includes/api/ApiMain.php(1037): Wikibase\Api\SetReference->execute()
#7 /srv/mediawiki/php-1.25wmf23/includes/api/ApiMain.php(394): ApiMain->executeAction()
#8 /srv/mediawiki/php-1.25wmf23/includes/api/ApiMain.php(367): ApiMain->executeActionWithErrorHandling()
#9 /srv/mediawiki/php-1.25wmf23/api.php(88): ApiMain->execute()

pretty much same as what is in the description, except different api module

Does this still happen despite Aaron's fix in I57eb41b463? Or isn't that deployed yet?

@daniel just checked... apparently not deployed yet to Wikidata

https://github.com/wikimedia/mediawiki/commits/wmf/1.25wmf24/includes/page/WikiPage.php (what we deploy tomorrow, has it)

https://github.com/wikimedia/mediawiki/commits/wmf/1.25wmf23/includes/page/WikiPage.php (currently deployed code, does not have it)

hopefully the issue is indeed fixed after tomorrow.

I think this is fixed now. Don't see it in the logs.