fix needed for cases where users have multiple userids, such as user:0 on enwiki
Open, Needs TriagePublic

Description

Since we have a script to clean up users with no ID (T181731), it would probably be a good idea to create a script to cleanup users listed with multiple ID numbers, like User:0 on enwiki. I don't know if there have been any other cases like this on other Wikimedia wikis, but in this case, any edit by User:0 with a userid of 0 where the edit summary is "Automated conversion" should probably be assigned to Conversion script. Also, the script should make sure to increment the user_editcount of the relevant user.

Graham87 created this task.Dec 8 2017, 1:12 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 8 2017, 1:12 AM

Also, the script should probably increment user_editcount in the user table if that's not done automatically by some other process.

Anomie added a subscriber: Anomie.Dec 25 2017, 9:16 PM

If you're pointing out how enwiki has 1356 edits where the revision table has rev_user_text as '0' (meaning https://en.wikipedia.org/wiki/User:0) and rev_user being the IDs of 202 different users, those will automagically be fixed when T167246: Refactor "user" & "user_text" fields into "actor" reference table is done as the migration script will trust the ID in rev_user over the name in rev_user_text.

There aren't currently any edits on enwiki with rev_user_text pointing to User:0 and rev_user being 0, so I'm not sure why you're

Also, the script should probably increment user_editcount in the user table if that's not done automatically by some other process.

Probably what should be done there is that imports should be fixed to increment the edit counts (and anything else that doesn't increment edit counts), then the existing initEditCount.php maintenance script could be run to update every user's edit count. That's a matter for a separate task.

If you're pointing out how enwiki has 1356 edits where the revision table has rev_user_text as '0' (meaning https://en.wikipedia.org/wiki/User:0) and rev_user being the IDs of 202 different users, those will automagically be fixed when T167246: Refactor "user" & "user_text" fields into "actor" reference table is done as the migration script will trust the ID in rev_user over the name in rev_user_text.

Yep, that's what I'm talking about. That fix sounds cool.

There aren't currently any edits on enwiki with rev_user_text pointing to User:0 and rev_user being 0, so I'm not sure why you're

There were, but it looks like they were changed to the current userid of 0 by the script in T181731 ... see the end of this list of contribs:
https://en.wikipedia.org/wiki/Special:Contributions/0