Page MenuHomePhabricator

Unable to undelete revision (Fatal error: given Title does not belong to page ID, RevisionStoreRecord)
Closed, DuplicatePublic

Description

  1. Create "Foo" with text "Version 1"
  2. Delete "Foo".
  3. Re-create "Foo" as text "Version 2".
  4. Try to undelete the old revision via Special:Undelete/Foo.

As of wmf.13, fails on both testwiki and test2wiki:

[W1ctUQpAIC0AAHy1RQIAAABG] /w/index.php?title=Special:Undelete&action=submit InvalidArgumentException from line 102 of /srv/mediawiki/php-1.32.0-wmf.13/includes/Storage/RevisionStoreRecord.php: The given Title does not belong to page ID 118665 but actually belongs to 118666

Backtrace:

#0 /srv/mediawiki/php-1.32.0-wmf.13/includes/Storage/RevisionStore.php(587): MediaWiki\Storage\RevisionStoreRecord->__construct(Title, User, CommentStoreComment, stdClass, MediaWiki\Storage\RevisionSlots, boolean)
#1 /srv/mediawiki/php-1.32.0-wmf.13/includes/Storage/RevisionStore.php(477): MediaWiki\Storage\RevisionStore->insertRevisionInternal(MediaWiki\Storage\RevisionArchiveRecord, Wikimedia\Rdbms\DatabaseMysqli, User, CommentStoreComment, Title, integer, integer)
#2 /srv/mediawiki/php-1.32.0-wmf.13/includes/libs/rdbms/database/Database.php(3731): Closure$MediaWiki\Storage\RevisionStore::insertRevisionOn(Wikimedia\Rdbms\DatabaseMysqli, string)
#3 /srv/mediawiki/php-1.32.0-wmf.13/includes/Storage/RevisionStore.php(479): Wikimedia\Rdbms\Database->doAtomicSection(string, Closure$MediaWiki\Storage\RevisionStore::insertRevisionOn;1196)
#4 /srv/mediawiki/php-1.32.0-wmf.13/includes/page/PageArchive.php(776): MediaWiki\Storage\RevisionStore->insertRevisionOn(MediaWiki\Storage\RevisionArchiveRecord, Wikimedia\Rdbms\DatabaseMysqli)
#5 /srv/mediawiki/php-1.32.0-wmf.13/includes/page/PageArchive.php(506): PageArchive->undeleteRevisions(array, boolean, string)
#6 /srv/mediawiki/php-1.32.0-wmf.13/includes/specials/SpecialUndelete.php(1147): PageArchive->undelete(array, string, array, boolean, User)
#7 /srv/mediawiki/php-1.32.0-wmf.13/includes/specials/SpecialUndelete.php(201): SpecialUndelete->undelete()

Event Timeline

Krinkle created this task.Jul 24 2018, 1:47 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 24 2018, 1:47 PM
zeljkofilipin triaged this task as Unbreak Now! priority.Jul 24 2018, 2:01 PM
zeljkofilipin added a subscriber: zeljkofilipin.

Changing priority to UBN since it's blocking the train.

Restricted Application added subscribers: Liuxinyu970226, TerraCodes. · View Herald TranscriptJul 24 2018, 2:01 PM
greg added a subscriber: greg.

MCR -> Core Platform Team.

Anomie added a subscriber: Anomie.Jul 24 2018, 3:27 PM

Duplicate of T200072, which already has a patch that someone should review, merge, and backport.

Restricted Application removed a subscriber: Liuxinyu970226. · View Herald TranscriptJul 24 2018, 3:34 PM
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:08 PM