Page MenuHomePhabricator

Special:DeletedContributions shows no or almost no edits.
Closed, ResolvedPublic

Description

I have around 4000 deleted edits on Commons. However, if I look at Special:DeletedContributions/AntiCompositeNumber, it shows only 3.

image.png (590×771 px, 95 KB)

If I click "oldest" or "older 50", it shows 0:

image.png (72×540 px, 12 KB)

Event Timeline

It's hitting the "could not be formatted" case:

<!-- Could not format Special:DeletedContribution row. -->

It's discarding this exception:

Caught exception Wikimedia\Assert\ParameterAssertionException: Bad value for parameter $row->ar_page_id: must be given, or $page must be an existing page
#0 /srv/mediawiki-staging/php-1.37.0-wmf.5/includes/Revision/RevisionArchiveRecord.php(86): Wikimedia\Assert\Assert::parameter(false, '$row->ar_page_i...', 'must be given, ...')
#1 /srv/mediawiki-staging/php-1.37.0-wmf.5/includes/Revision/RevisionStore.php(1642): MediaWiki\Revision\RevisionArchiveRecord->__construct(Object(Title), Object(MediaWiki\User\UserIdentityValue), Object(CommentStoreComment), Object(stdClass), Object(MediaWiki\Revision\RevisionSlots), false)
#2 /srv/mediawiki-staging/php-1.37.0-wmf.5/includes/Revision/RevisionStore.php(1540): MediaWiki\Revision\RevisionStore->newRevisionFromArchiveRowAndSlots(Object(stdClass), Object(MediaWiki\Revision\RevisionSlots), 0, Object(Title), Array)
#3 /srv/mediawiki-staging/php-1.37.0-wmf.5/maintenance/eval.php(83) : eval()'d code(1): MediaWiki\Revision\RevisionStore->newRevisionFromArchiveRow(Object(stdClass))
#4 /srv/mediawiki-staging/php-1.37.0-wmf.5/maintenance/eval.php(83): eval()
#5 /srv/mediawiki-staging/multiversion/MWScript.php(116): require_once('/srv/mediawiki-...')
#6 {main}

So that is due to https://gerrit.wikimedia.org/r/c/mediawiki/core/+/663218 , which was just merged.

* TimStarling does the "not my fault" dance*

Change 690807 had a related patch set uploaded (by Tim Starling; author: Tim Starling):

[mediawiki/core@master] Revert "Add assertions about page IDs during undeletion."

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

I reproduced the bug locally and tested the fix.

I'm looking at a doing a followup patch to DeletedContribsPager. I suppose anything that calls newRevisionFromArchiveRow() should be getting its field list from getArchiveQueryInfo(). But the RevisionFactory interface injected into DeletedContribsPager prevents that, since it lacks getArchiveQueryInfo() provided by the implementing class RevisionStore. What is the point of injecting a RevisionFactory if it is not possible to safely call any of its methods?

Change 690807 merged by Tim Starling:

[mediawiki/core@master] Revert "Add assertions about page IDs during undeletion."

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

Change 690796 had a related patch set uploaded (by Tim Starling; author: Tim Starling):

[mediawiki/core@wmf/1.37.0-wmf.5] Revert "Add assertions about page IDs during undeletion."

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

Change 690796 merged by jenkins-bot:

[mediawiki/core@wmf/1.37.0-wmf.5] Revert "Add assertions about page IDs during undeletion."

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

Mentioned in SAL (#wikimedia-operations) [2021-05-14T03:16:30Z] <tstarling@deploy1002> Synchronized php-1.37.0-wmf.5/includes/Revision/RevisionArchiveRecord.php: fix DeletedContributions breakage T282844 (duration: 01m 07s)

Mentioned in SAL (#wikimedia-operations) [2021-05-14T03:18:34Z] <tstarling@deploy1002> Synchronized php-1.37.0-wmf.5/includes/page/PageArchive.php: T282844 (duration: 01m 07s)

Mentioned in SAL (#wikimedia-operations) [2021-05-14T03:20:08Z] <tstarling@deploy1002> Synchronized php-1.37.0-wmf.5/includes/page/WikiPage.php: T282844 (duration: 01m 06s)

Itsontmatter closed this task as Resolved.
Itsontmatter set Due Date to May 16 2021, 12:00 AM.
Itsontmatter updated the task description. (Show Details)

Change 693220 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] Add getQueryInfo to RevisionFactory

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

Change 693220 merged by jenkins-bot:

[mediawiki/core@master] Add getQueryInfo to RevisionFactory

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

Change 693380 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] Use getArchiveQueryInfo in DeletedContribsPager.

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

Change 693380 merged by jenkins-bot:

[mediawiki/core@master] Use getArchiveQueryInfo in DeletedContribsPager.

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