Page MenuHomePhabricator

Rebuildrecentchanges.php does not work correctly in MediaWiki 1.31 and later
Closed, ResolvedPublic

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

GTrang 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
GTrang 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

In T199474#5003716, @GeoffreyT2000 wrote:

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

Change 494636 merged by jenkins-bot:
[mediawiki/core@master] Set rc_patrolled to 2 for autopatrolled changes in rebuildrecentchanges.php

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

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

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

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

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

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

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

Change 571844 merged by jenkins-bot:
[mediawiki/core@REL1_31] Set rc_patrolled to 2 for autopatrolled changes in rebuildrecentchanges.php

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

Change 571847 merged by jenkins-bot:
[mediawiki/core@REL1_34] Set rc_patrolled to 2 for autopatrolled changes in rebuildrecentchanges.php

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

Change 571846 merged by jenkins-bot:
[mediawiki/core@REL1_33] Set rc_patrolled to 2 for autopatrolled changes in rebuildrecentchanges.php

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

GTrang claimed this task.

All fixed now, including backports to REL1_31, REL1_33, and REL1_34.