Page MenuHomePhabricator

Consider fixing invalid titles in rights log (Meta-Wiki and ptwiki)
Closed, ResolvedPublic

Description

When running maintenance script for T6055, I noticed that there are 11 rights/rights log entries on MetaWiki, where log_title is in form #(userId)@(wikiId). All these entries are quite old and seem to be a historical quirk. It's expected that – when using #id syntax on Special:UserRights – the log entry will link to the resolved user page, thus having a valid title in the log.

Given that the titles contain #, they are invalid and attempting to parse them might lead to unexpected exceptions. They can also make it harder to discover the relevant log entries when doing analytics. Therefore, I'd like to propose fixing the log entries, so that they properly refer to the user, whose rights were changed.

The logs in question are (all in metawiki database):

log_idlog_titlecorrect_title
243#7@scnwiktionaryPippu_d'Angelo@scnwiktionary
1995#41983@enwikiÆvar_Arnfjörð_Bjarmason@enwiki
2024#1207@svwikiLamré@svwiki
2740#7@fiu_vrowikiVõrok@fiu_vrowiki
3924#58@tewikiవైజాసత్య@tewiki
10269#185@fiwiktionaryH-Bot@fiwiktionary
11138#120@fawikiGolnab801221215@fawiki
11139#120@fawikiGolnab801221215@fawiki
11140#210@fawikiدانیل@fawiki
15375#2@iswikisourceStefán_Ingi@iswikisource
46739#53@tywikiTaʻata_ʻeuropa@tywiki

Then, I also checked other wikis for rights logs, where log_title starts with #. There was one such instance in ptwiki database:

log_idlog_titlecorrect_title
1197#1773N&n's

Event Timeline

Ladsgroup triaged this task as Medium priority.
Ladsgroup moved this task from Triage to Ready on the DBA board.
Ladsgroup subscribed.

I will clean it up on Monday. Avoiding doing this on Fridays.

First round:

cumin2024@db1181.eqiad.wmnet[metawiki]> select * from logging where log_id = 243;
+--------+----------+------------+----------------+---------------+------------------+----------------+------------+-------------+-----------+----------+
| log_id | log_type | log_action | log_timestamp  | log_namespace | log_title        | log_comment_id | log_params | log_deleted | log_actor | log_page |
+--------+----------+------------+----------------+---------------+------------------+----------------+------------+-------------+-----------+----------+
|    243 | rights   | rights     | 20050114143438 |             2 | #7@scnwiktionary |        3552986 |            |           0 |    605079 |     NULL |
+--------+----------+------------+----------------+---------------+------------------+----------------+------------+-------------+-----------+----------+
1 row in set (0.002 sec)

cumin2024@db1181.eqiad.wmnet[metawiki]> update logging set log_title = "Pippu_d'Angelo@scnwiktionary" where log_id = 243 limit 1;
Query OK, 1 row affected, 1 warning (0.003 sec)
Rows matched: 1  Changed: 1  Warnings: 1

cumin2024@db1181.eqiad.wmnet[metawiki]> select * from logging where log_id = 1995;
+--------+----------+------------+----------------+---------------+---------------+----------------+------------+-------------+-----------+----------+
| log_id | log_type | log_action | log_timestamp  | log_namespace | log_title     | log_comment_id | log_params | log_deleted | log_actor | log_page |
+--------+----------+------------+----------------+---------------+---------------+----------------+------------+-------------+-----------+----------+
|   1995 | rights   | rights     | 20050517164921 |             2 | #41983@enwiki |           7226 |            |           0 |    605015 |     NULL |
+--------+----------+------------+----------------+---------------+---------------+----------------+------------+-------------+-----------+----------+
1 row in set (0.002 sec)

cumin2024@db1181.eqiad.wmnet[metawiki]> update logging set log_title = "Ævar_Arnfjörð_Bjarmason@enwiki" where log_id = 1995 limit 1;
Query OK, 1 row affected, 1 warning (0.002 sec)
Rows matched: 1  Changed: 1  Warnings: 1

cumin2024@db1181.eqiad.wmnet[metawiki]> select * from logging where log_id = 2024;
+--------+----------+------------+----------------+---------------+--------------+----------------+------------+-------------+-----------+----------+
| log_id | log_type | log_action | log_timestamp  | log_namespace | log_title    | log_comment_id | log_params | log_deleted | log_actor | log_page |
+--------+----------+------------+----------------+---------------+--------------+----------------+------------+-------------+-----------+----------+
|   2024 | rights   | rights     | 20050520133301 |             2 | #1207@svwiki |           7226 |            |           0 |    605079 |     NULL |
+--------+----------+------------+----------------+---------------+--------------+----------------+------------+-------------+-----------+----------+
1 row in set (0.001 sec)

cumin2024@db1181.eqiad.wmnet[metawiki]> update logging set log_title = "Lamré@svwiki" where log_id = 2024 limit 1;
Query OK, 1 row affected, 1 warning (0.003 sec)
Rows matched: 1  Changed: 1  Warnings: 1

cumin2024@db1181.eqiad.wmnet[metawiki]> select * from logging where log_id = 2740;
+--------+----------+------------+----------------+---------------+----------------+----------------+------------+-------------+-----------+----------+
| log_id | log_type | log_action | log_timestamp  | log_namespace | log_title      | log_comment_id | log_params | log_deleted | log_actor | log_page |
+--------+----------+------------+----------------+---------------+----------------+----------------+------------+-------------+-----------+----------+
|   2740 | rights   | rights     | 20050626164226 |             2 | #7@fiu_vrowiki |        3553026 |            |           0 |    612358 |     NULL |
+--------+----------+------------+----------------+---------------+----------------+----------------+------------+-------------+-----------+----------+
1 row in set (0.001 sec)

cumin2024@db1181.eqiad.wmnet[metawiki]> update logging set log_title = "Võrok@fiu_vrowiki" where log_id = 2740 limit 1;
Query OK, 1 row affected, 1 warning (0.003 sec)
Rows matched: 1  Changed: 1  Warnings: 1

Second round:

cumin2024@db1181.eqiad.wmnet[metawiki]> select * from logging where log_id = 3924;
+--------+----------+------------+----------------+---------------+------------+----------------+-------------------------+-------------+-----------+----------+
| log_id | log_type | log_action | log_timestamp  | log_namespace | log_title  | log_comment_id | log_params              | log_deleted | log_actor | log_page |
+--------+----------+------------+----------------+---------------+------------+----------------+-------------------------+-------------+-----------+----------+
|   3924 | rights   | rights     | 20050807213341 |             2 | #58@tewiki |              2 | sysop
sysop, bureaucrat |           0 |    612358 |     NULL |
+--------+----------+------------+----------------+---------------+------------+----------------+-------------------------+-------------+-----------+----------+
1 row in set (0.001 sec)

cumin2024@db1181.eqiad.wmnet[metawiki]> update logging set log_title = "వైజాసత్య@tewiki" where log_id = 3924 limit 1;
Query OK, 1 row affected, 1 warning (0.003 sec)
Rows matched: 1  Changed: 1  Warnings: 1

cumin2024@db1181.eqiad.wmnet[metawiki]> select * from logging where log_id = 10269;
+--------+----------+------------+----------------+---------------+-------------------+----------------+------------+-------------+-----------+----------+
| log_id | log_type | log_action | log_timestamp  | log_namespace | log_title         | log_comment_id | log_params | log_deleted | log_actor | log_page |
+--------+----------+------------+----------------+---------------+-------------------+----------------+------------+-------------+-----------+----------+
|  10269 | rights   | rights     | 20051111190817 |             2 | #185@fiwiktionary |              2 | 
bot       |           0 |    612358 |     NULL |
+--------+----------+------------+----------------+---------------+-------------------+----------------+------------+-------------+-----------+----------+
1 row in set (0.002 sec)

cumin2024@db1181.eqiad.wmnet[metawiki]> update logging set log_title = "H-Bot@fiwiktionary" where log_id = 10269 limit 1;
Query OK, 1 row affected, 1 warning (0.003 sec)
Rows matched: 1  Changed: 1  Warnings: 1

cumin2024@db1181.eqiad.wmnet[metawiki]> select * from logging where log_id = 11138;
+--------+----------+------------+----------------+---------------+-------------+----------------+------------+-------------+-----------+----------+
| log_id | log_type | log_action | log_timestamp  | log_namespace | log_title   | log_comment_id | log_params | log_deleted | log_actor | log_page |
+--------+----------+------------+----------------+---------------+-------------+----------------+------------+-------------+-----------+----------+
|  11138 | rights   | rights     | 20051123114340 |             2 | #120@fawiki |              2 | 
bot       |           0 |    106788 |     NULL |
+--------+----------+------------+----------------+---------------+-------------+----------------+------------+-------------+-----------+----------+
1 row in set (0.001 sec)

cumin2024@db1181.eqiad.wmnet[metawiki]> update logging set log_title = "Golnab801221215@fawiki" where log_id = 11138 limit 1;
Query OK, 1 row affected, 1 warning (0.003 sec)
Rows matched: 1  Changed: 1  Warnings: 1

cumin2024@db1181.eqiad.wmnet[metawiki]> select * from logging where log_id = 11139;
+--------+----------+------------+----------------+---------------+-------------+----------------+------------+-------------+-----------+----------+
| log_id | log_type | log_action | log_timestamp  | log_namespace | log_title   | log_comment_id | log_params | log_deleted | log_actor | log_page |
+--------+----------+------------+----------------+---------------+-------------+----------------+------------+-------------+-----------+----------+
|  11139 | rights   | rights     | 20051123114523 |             2 | #120@fawiki |              2 | bot
       |           0 |    106788 |     NULL |
+--------+----------+------------+----------------+---------------+-------------+----------------+------------+-------------+-----------+----------+
1 row in set (0.001 sec)

cumin2024@db1181.eqiad.wmnet[metawiki]> update logging set log_title = "Golnab801221215@fawiki" where log_id = 11139 limit 1;
Query OK, 1 row affected, 1 warning (0.002 sec)
Rows matched: 1  Changed: 1  Warnings: 1

cumin2024@db1181.eqiad.wmnet[metawiki]> select * from logging where log_id = 11140;
+--------+----------+------------+----------------+---------------+-------------+----------------+------------+-------------+-----------+----------+
| log_id | log_type | log_action | log_timestamp  | log_namespace | log_title   | log_comment_id | log_params | log_deleted | log_actor | log_page |
+--------+----------+------------+----------------+---------------+-------------+----------------+------------+-------------+-----------+----------+
|  11140 | rights   | rights     | 20051123114532 |             2 | #210@fawiki |              2 | 
bot       |           0 |    106788 |     NULL |
+--------+----------+------------+----------------+---------------+-------------+----------------+------------+-------------+-----------+----------+
1 row in set (0.001 sec)

cumin2024@db1181.eqiad.wmnet[metawiki]> update logging set log_title = "دانیل@fawiki" where log_id = 11140 limit 1;
Query OK, 1 row affected, 1 warning (0.003 sec)
Rows matched: 1  Changed: 1  Warnings: 1

cumin2024@db1181.eqiad.wmnet[metawiki]> select * from logging where log_id = 15375;
+--------+----------+------------+----------------+---------------+-----------------+----------------+--------------------+-------------+-----------+----------+
| log_id | log_type | log_action | log_timestamp  | log_namespace | log_title       | log_comment_id | log_params         | log_deleted | log_actor | log_page |
+--------+----------+------------+----------------+---------------+-----------------+----------------+--------------------+-------------+-----------+----------+
|  15375 | rights   | rights     | 20060109194436 |             2 | #2@iswikisource |              2 | 
sysop, bureaucrat |           0 |    605079 |     NULL |
+--------+----------+------------+----------------+---------------+-----------------+----------------+--------------------+-------------+-----------+----------+
1 row in set (0.001 sec)

cumin2024@db1181.eqiad.wmnet[metawiki]> update logging set log_title = "Stefán_Ingi@iswikisource" where log_id = 11140 limit 1;
Query OK, 1 row affected, 1 warning (0.002 sec)
Rows matched: 1  Changed: 1  Warnings: 1

cumin2024@db1181.eqiad.wmnet[metawiki]> select * from logging where log_id = 46739;
+--------+----------+------------+----------------+---------------+------------+----------------+------------+-------------+-----------+----------+
| log_id | log_type | log_action | log_timestamp  | log_namespace | log_title  | log_comment_id | log_params | log_deleted | log_actor | log_page |
+--------+----------+------------+----------------+---------------+------------+----------------+------------+-------------+-----------+----------+
|  46739 | rights   | rights     | 20060929102423 |             2 | #53@tywiki |              2 | 
sysop     |           0 |    614690 |     NULL |
+--------+----------+------------+----------------+---------------+------------+----------------+------------+-------------+-----------+----------+
1 row in set (0.002 sec)

cumin2024@db1181.eqiad.wmnet[metawiki]> update logging set log_title = "Taʻata_ʻeuropa@tywiki" where log_id = 46739 limit 1;
Query OK, 1 row affected, 1 warning (0.002 sec)
Rows matched: 1  Changed: 1  Warnings: 1
Ladsgroup moved this task from Ready to Done on the DBA board.
cumin2024@db1222.eqiad.wmnet[ptwiki]> select * from logging where log_id = 1197;
+--------+----------+------------+----------------+---------------+-----------+----------------+------------+-------------+-----------+----------+
| log_id | log_type | log_action | log_timestamp  | log_namespace | log_title | log_comment_id | log_params | log_deleted | log_actor | log_page |
+--------+----------+------------+----------------+---------------+-----------+----------------+------------+-------------+-----------+----------+
|   1197 | rights   | rights     | 20050204225611 |             2 | #1773     |       11875615 |            |           0 |      1834 |     NULL |
+--------+----------+------------+----------------+---------------+-----------+----------------+------------+-------------+-----------+----------+
1 row in set (0.003 sec)

cumin2024@db1222.eqiad.wmnet[ptwiki]> update logging set log_title = "N&n's" where log_id = 1197 limit 1;
Query OK, 1 row affected, 1 warning (0.005 sec)
Rows matched: 1  Changed: 1  Warnings: 1
mszwarc reopened this task as Open.EditedApr 14 2026, 7:33 AM

Thanks, @Ladsgroup! However, you made a mistake here:

cumin2024@db1181.eqiad.wmnet[metawiki]> select * from logging where log_id = 11140;
+--------+----------+------------+----------------+---------------+-------------+----------------+------------+-------------+-----------+----------+
| log_id | log_type | log_action | log_timestamp  | log_namespace | log_title   | log_comment_id | log_params | log_deleted | log_actor | log_page |
+--------+----------+------------+----------------+---------------+-------------+----------------+------------+-------------+-----------+----------+
|  11140 | rights   | rights     | 20051123114532 |             2 | #210@fawiki |              2 | 
bot       |           0 |    106788 |     NULL |
+--------+----------+------------+----------------+---------------+-------------+----------------+------------+-------------+-----------+----------+
1 row in set (0.001 sec)

cumin2024@db1181.eqiad.wmnet[metawiki]> update logging set log_title = "دانیل@fawiki" where log_id = 11140 limit 1;
Query OK, 1 row affected, 1 warning (0.003 sec)
Rows matched: 1  Changed: 1  Warnings: 1

cumin2024@db1181.eqiad.wmnet[metawiki]> select * from logging where log_id = 15375;
+--------+----------+------------+----------------+---------------+-----------------+----------------+--------------------+-------------+-----------+----------+
| log_id | log_type | log_action | log_timestamp  | log_namespace | log_title       | log_comment_id | log_params         | log_deleted | log_actor | log_page |
+--------+----------+------------+----------------+---------------+-----------------+----------------+--------------------+-------------+-----------+----------+
|  15375 | rights   | rights     | 20060109194436 |             2 | #2@iswikisource |              2 | 
sysop, bureaucrat |           0 |    605079 |     NULL |
+--------+----------+------------+----------------+---------------+-----------------+----------------+--------------------+-------------+-----------+----------+
1 row in set (0.001 sec)

cumin2024@db1181.eqiad.wmnet[metawiki]> update logging set log_title = "Stefán_Ingi@iswikisource" where log_id = 11140 limit 1;
Query OK, 1 row affected, 1 warning (0.002 sec)
Rows matched: 1  Changed: 1  Warnings: 1

I.e., second update changed row with log_id = 11140, the same as earlier. Could you please fix it when you have time? That means, change 11140 back to user from fawiki and update title in 15375 to have actual user name.

Ladsgroup closed this task as Resolved.EditedApr 14 2026, 11:52 AM

Ah thanks. Fixed both.