When editing at a high rate I seem to be able to get MW to give me the option to roll-back 0 edits on my Special:Contributions.
See images below. Seems I can reproduce it on demand with a few refreshes.
Description
Details
Related Objects
Event Timeline
Hello. I also encountered this bug while having to rollback around 50 edits. it said [rollback 0 edits] when it should be [rollback 1 edit]. Like the creator of this bug, I was also doing large edits. I don't see the connection between that and 0 instead of 1, but it is true. I am unsure if it always says 0, or just flickers about a little, as I was only reverting a single edit in all cases.
Change 596799 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Linker: If edit count for rollback is 0, assume race condition and use 1
Danny's change seems to just change 0 to 1. I'm not entirely sure if that fixes it, though, for example what happens if you're really trying to rollback 2 edits, does that say 2, 1, or 0, or something else? I see nothing wrong with the quick hack as, but would it actually fix the problem? Because if 2 gets calculated to 0, then this code will change it to 1, when it should have been 2. Can anyone confirm what happens when rapidly rollbacking and then coming across multiple edits (if that's even what causes it)
In that case, what happens if it should show 2. Does it show 1? Or does this bug only happen when for a single edit? All questions I don't have the answer to as I've only encountered it once, but necessary for a good and permanent fix
Should show | currently shows | will show ----------------------------------------- 1 | 0 | 1 2 | 0 | 1 1 | 1 | 1 2 | 2 | 2
However, I have not encountered 0 when it should show 2
Since this is a relatively minor bug anyway, I would prefer to leave it until it's actually found out why it counts as 0. If it actually prevented the edit from being rolled back, that would be one thing, but it's not.
I just got this again while rapidly refreshing a vandal's contribs waiting for a block - 0 only appears when it should be 1
Just a thought, how about a race-condition where if it wants to say Rollback 0 edits simply write Rollback edit(s) or something.
Change 656606 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Fallback to generic rollback message when editcount is unclear
Change 656606 merged by jenkins-bot:
[mediawiki/core@master] Fallback to generic rollback message when editcount is unclear
Change 596799 abandoned by Umherirrender:
[mediawiki/core@master] Linker: If edit count for rollback is 0, assume race condition and use 1
Reason:
Superseeded by I2d8108b1be5d25c33a68c40731a127deb3f45819