Page MenuHomePhabricator

Revision xxx doesn't belong to page yyy when viewing deleted revisions of a deleted page
Closed, DuplicatePublic

Description

Error message
[XduzjQpAMFoAABbQta4AAAAY] /w/index.php?title=Speciale:Ripristina&target=Che+Guevara&timestamp=20081019130539&diff=prev&uselang=en   InvalidArgumentException from line 3275 of /srv/mediawiki/php-1.35.0-wmf.5/includes/Revision/RevisionStore.php: Revision 19584762 doesn't belong to page 2104810
Impact

Prevents you from seeing the diff.

Notes

Split from T239083. Repro steps taken from there (not guaranteed to work consistently, see below):

  1. Have a page with a bunch of revisions
  2. Delete the page
  3. Go to Special:Undelete and restore all revisions but one (e.g. the second one)
  4. Delete the page again
  5. Go to Special:Undelete again, and click the "diff" link next to the revision you've left alone at (3.)
    1. You should get an exception

As I said, I haven't checked whether it happens consistently for all pages. I've experienced this issue on itwiki for the page "Che Guevara", trying to view a diff from 2008 which was deleted at the time (no revdel). More details on T239083.

Note that if you simply head to the URL I've posted you don't get an exception, but rather the following message:

Invalid or missing revision. You may have a bad link, or the revision may have been restored or removed from the archive.

That's because I've restored that revision and re-deleted it via revdel.

Details

Request ID
XduzjQpAMFoAABbQta4AAAAY
Request URL
https://it.wikipedia.org/w/index.php?title=Speciale:Ripristina&target=Che+Guevara&timestamp=20081019130539&diff=prev
Stack Trace
#0 /srv/mediawiki/php-1.35.0-wmf.5/includes/Revision/RevisionStore.php(3483): MediaWiki\Revision\RevisionStore->assertRevisionParameter(string, integer, MediaWiki\Revision\RevisionArchiveRecord)
#1 /srv/mediawiki/php-1.35.0-wmf.5/includes/diff/DifferenceEngine.php(1552): MediaWiki\Revision\RevisionStore->countRevisionsBetween(integer, MediaWiki\Revision\RevisionArchiveRecord, MediaWiki\Revision\RevisionArchiveRecord, integer)
#2 /srv/mediawiki/php-1.35.0-wmf.5/includes/diff/DifferenceEngine.php(1052): DifferenceEngine->getMultiNotice()
#3 /srv/mediawiki/php-1.35.0-wmf.5/includes/specials/SpecialUndelete.php(583): DifferenceEngine->getDiff(string, string)
#4 /srv/mediawiki/php-1.35.0-wmf.5/includes/specials/SpecialUndelete.php(429): SpecialUndelete->showDiff(Revision, Revision)
#5 /srv/mediawiki/php-1.35.0-wmf.5/includes/specials/SpecialUndelete.php(204): SpecialUndelete->showRevision(string)
#6 /srv/mediawiki/php-1.35.0-wmf.5/includes/specialpage/SpecialPage.php(575): SpecialUndelete->execute(NULL)
#7 /srv/mediawiki/php-1.35.0-wmf.5/includes/specialpage/SpecialPageFactory.php(607): SpecialPage->run(NULL)
#8 /srv/mediawiki/php-1.35.0-wmf.5/includes/MediaWiki.php(298): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#9 /srv/mediawiki/php-1.35.0-wmf.5/includes/MediaWiki.php(967): MediaWiki->performRequest()
#10 /srv/mediawiki/php-1.35.0-wmf.5/includes/MediaWiki.php(530): MediaWiki->main()
#11 /srv/mediawiki/php-1.35.0-wmf.5/index.php(46): MediaWiki->run()
#12 /srv/mediawiki/w/index.php(3): require(string)
#13 {main}