Page MenuHomePhabricator

Rollbacks are not counted in user edit counts
Open, HighPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Make a dummy edit in a sandbox.
  • Check and remember your current edit count in Preferences => Number of edits.
  • Rollback your dummy edit using the rollback feature.

What happens?:
After performing the rollback, your edit count remains the same as it was before.

What should have happened instead?:
The rollback should count as an edit, and the number of edits in "Preferences => Number of edits" should increase by one.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
1.44.0-wmf.8 (f08e6b3)

Other information (browser name/version, screenshots, etc.):

Event Timeline

The Number of edits do increase by 1 when we undo it...also there is a tag Reverted assigned to the undone edit

Aklapper renamed this task from [REGRESSION] Rollbacks are not counted in user edit counts to Rollbacks are not counted in user edit counts.Mon, Dec 30, 12:57 PM

I just confirmed this on enwiki in case it needed confirmation. @Randomdude121 had asked about it and I'm pretty sure my rollbacks were counted in the years before. Past rollbacks are still part of my edit count, new ones are not counted.

Should have been fixed by T381299: Emit PageUpdatedEvents on all occasion the page content changes.. It's possible that the patch didn't make it into production over the holidays. I'll have a look tomorrow.

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

[mediawiki/core@master] RollbackAction: do not mark rollbacks as internal

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

Turns out that the problem was different what what I originally suspected. The change that I thought might fix this issue actually caused it: r1099368 introduced a check into ChangeTrackingEventIngress that would prevent updates with EDIT_INTERNAL from being counted as user edits. Since rollbacks have this flag set, we are no longer counting them.

EDIT_INTERNAL is used for imports and for things like changing the page's content model. It's also used for dummy revisions and atomatic redirect creation, which should not count as edits. I think it shouldn't be set for rollbacks. The flag doesn't seem to have other effects, so I made a patch that removed it from rollbacks.

What is to be fixed now?

The fix I made needs to be reviewed and merged, and will probably go live next week with the regular deployment train.