Page MenuHomePhabricator

Rebuildrecentchanges.php does not work correctly in MediaWiki 1.31 and later
Open, Needs TriagePublic

Description

In MediaWiki 1.31 and later, when running rebuildrecentchanges.php, all edits by registered users will have the rc_patrolled field equal to 1 regardless of whether the user has autopatrol rights or not. The problem occurs regardless of whether one has the actor table migration enabled or not. The script should be fixed to correctly leave rc_patrolled as 0 for edits by registered users without autopatrol rights, and set rc_patrolled to 2 instead of 1 for edits by users with autopatrol rights, including sysops and bots. Similarly, if there is at least one bot on the wiki, all edits by registered non-bot users will be incorrectly marked as bot edits in the recentchanges table when they shouldn't be.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 12 2018, 8:06 PM
Reedy added a subscriber: Reedy.Jul 12 2018, 9:28 PM

Looking at the actor patch, I don't see this as new behaviour to the script

https://github.com/wikimedia/mediawiki/commit/b09a23f284079758653c62305f1ab590e48a09a3

GeoffreyT2000 renamed this task from Rebuildrecentchanges.php does not work correctly in MediaWiki 1.31 to Rebuildrecentchanges.php does not work correctly in MediaWiki 1.31 and later.Feb 28 2019, 12:46 AM
GeoffreyT2000 updated the task description. (Show Details)

Change 494636 had a related patch set uploaded (by GeoffreyT2000; owner: GeoffreyT2000):
[mediawiki/core@master] Set rc_patrolled to 2 for autopatrolled changes in rebuildrecentchanges.php

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

The part about rc_bot has already been fixed with https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/494619/. Perhaps
Jack Phoenix and Lewis Cawte could also make a similar patch that fixes the problem for rc_patrolled.

Change 494672 had a related patch set uploaded (by Lewis Cawte; owner: Jack Phoenix):
[mediawiki/core@REL1_31] user_group, the nonexistent table that keeps on giving

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

lcawte added a comment.Mar 6 2019, 9:53 AM

The part about rc_bot has already been fixed with https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/494619/. Perhaps
Jack Phoenix and Lewis Cawte could also make a similar patch that fixes the problem for rc_patrolled.

So it seems that the cause of this bug was the same as the one we patched last night - a typo in the user_groups table name resulting in broken joins. @ashley patched this, and it has been merged into core, the backports are still pending as of the time of writing.

Change 494675 had a related patch set uploaded (by Lewis Cawte; owner: Jack Phoenix):
[mediawiki/core@REL1_32] user_group, the nonexistent table that keeps on giving

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

Change 494675 merged by jenkins-bot:
[mediawiki/core@REL1_32] user_group, the nonexistent table that keeps on giving

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

Change 494672 merged by jenkins-bot:
[mediawiki/core@REL1_31] user_group, the nonexistent table that keeps on giving

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

Change 494636 had a related patch set uploaded (by GeoffreyT2000; owner: GeoffreyT2000):
[mediawiki/core@master] Set rc_patrolled to 2 for autopatrolled changes in rebuildrecentchanges.php

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