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

Details

Related Gerrit Patches:

Event Timeline

hoo created this task.Mar 25 2015, 11:35 PM
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.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 25 2015, 11:35 PM
hoo set Security to None.

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

aaron claimed this task.Mar 26 2015, 3:40 AM

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

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

Multichill added a subscriber: Multichill.EditedApr 6 2015, 10:53 AM

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.

aude added a comment.Apr 6 2015, 10:57 AM

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

daniel added a subscriber: daniel.Apr 6 2015, 2:42 PM

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

aude added a comment.Apr 6 2015, 2:46 PM

@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.

Stryn added a subscriber: Stryn.Apr 6 2015, 3:39 PM
aaron moved this task from Backlog to Doing on the Availability board.Apr 8 2015, 10:56 PM
aaron added a comment.Apr 15 2015, 6:55 AM

So is this resolved?

aude added a comment.Apr 15 2015, 7:47 AM

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

aude closed this task as Resolved.Apr 15 2015, 7:47 AM