Page MenuHomePhabricator

Cannot view diffs on Special:Undelete - ends in InvalidArgumentException
Open, HighPublic

Description

Error message
[XcTboQpAIC8AAGLFHhwAAACX] 2019-11-08 03:06:10: Fatal exception of type "InvalidArgumentException"
Impact
  • Cannot view diffs on Special:Undelete
Notes
  • The revisions being compared (20151109221820 and 20151109221748 for the request URL) can be viewed individually.

Attempting to view diffs of a deleted version leads to an internal error

Steps to reproduce:

  1. Have a page with some revisions
  2. Have the access to see deleted revisions
  3. Have the page in (1) deleted
  4. Attempt to "view diff" across deleted revisions
  5. FAIL: ERROR

Details

Request ID
XcTboQpAIC8AAGLFHhwAAACX
Request URL
https://en.wikipedia.org/w/index.php?title=Special:Undelete&target=Elliott+Bisnow&timestamp=20151109221820&diff=prev
Stack Trace
2019-11-08 03:06:10 [XcTboQpAIC8AAGLFHhwAAACX] mw1326 enwiki 1.35.0-wmf.5 exception ERROR: [XcTboQpAIC8AAGLFHhwAAACX] /w/index.php?title=Special:Undelete&target=Elliott+Bisnow&timestamp=20151109221820&diff=prev   InvalidArgumentException from line 3275 of /srv/mediawiki/php-1.35.0-wmf.5/includes/Revision/RevisionStore.php: Revision 689868905 doesn't belong to page 0 {"exception_id":"XcTboQpAIC8AAGLFHhwAAACX","exception_url":"/w/index.php?title=Special:Undelete&target=Elliott+Bisnow&timestamp=20151109221820&diff=prev","caught_by":"mwe_handler"} 
[Exception InvalidArgumentException] (/srv/mediawiki/php-1.35.0-wmf.5/includes/Revision/RevisionStore.php:3275) Revision 689868905 doesn't belong to page 0
  #0 /srv/mediawiki/php-1.35.0-wmf.5/includes/Revision/RevisionStore.php(3482): 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}

Event Timeline

JJMC89 created this task.Fri, Nov 8, 3:19 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFri, Nov 8, 3:19 AM
JJMC89 reopened this task as Open.Fri, Nov 8, 4:59 PM

Based on the stack trace, those are not the same. This one isn't limited to a particular page or revision.

Luke081515 triaged this task as High priority.Sat, Nov 9, 3:58 PM

Side note: Merging duplicates is annoying, it breaks other relationship.

Appears to have been caused by T235666

Xaosflux renamed this task from Cannot view diffs on Special:Undelete to Cannot view diffs on Special:Undelete - ends in InvalidArgumentException.Sat, Nov 9, 9:22 PM
Xaosflux updated the task description. (Show Details)

Side note: Merging duplicates is annoying, it breaks other relationship.

Not sure what mean here. Duplicates should not be merged?

it breaks other relationship.

I am not sure what you meant by that.

@Ammarpad @Masumrezarock100 no no they should be according to our current workflow, not a complaint on your part! Just a general complaint about phabricator. For example if a ticket has a parent/child relationship, and is merged - the other ticket (generally the earlier of the duplicates) doesn't inherit that linkage.

@Ammarpad @Masumrezarock100 no no they should be according to our current workflow, not a complaint on your part! Just a general complaint about phabricator. For example if a ticket has a parent/child relationship, and is merged - the other ticket (generally the earlier of the duplicates) doesn't inherit that linkage.

I see that. Thanks for the clarification.

daniel added a subscriber: daniel.Mon, Nov 11, 8:00 PM

Probably introduced by https://gerrit.wikimedia.org/r/c/mediawiki/core/+/543718. Pinging @Pchelolo.

It seems like getMultiNotice() cannot work reliably for deleted revisions, since deleted revisions for the same title may have different page IDs, or may have page ID 0 for old entries. It should probably be skipped if the two revisions don't belong to the same page, or don't match $this->mNewPage->getArticleID().

Chenzw added a subscriber: Chenzw.Tue, Nov 12, 6:55 AM
Wargo added a subscriber: Wargo.Tue, Nov 12, 3:40 PM

since deleted revisions for the same title may have different page IDs, or may have page ID 0 for old entries.

Maybe this is (one of) the cause. I noticed it on page deleted&recreated twice - can't compare deleted revisions (even to revisions belonged to the same creation) but possible to retrieve versions. Page created and deleted today.

Liz added a subscriber: Liz.Fri, Nov 15, 3:55 PM