Page MenuHomePhabricator

Old log actions do not appear when performer is specified
Closed, ResolvedPublic

Description

Log actions (such as deletions, protections, blocks, etc.) that were performed prior to 2009 do not appear on [[Special:Log]] when the user who has performed the action is specified.

To reproduce this issue:

  1. Go to [[Special:Log]] on any wiki.
  2. In the "Performer" box above, type a user name who performed any log action before 2009, and then click the "Show" button.
  3. Click the "oldest" link to see the oldest log entries. For some reason, the log does not show actions that were performed before 2009 (usually September 2009).

Event Timeline

Guycn2 created this task.Mar 3 2018, 3:01 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 3 2018, 3:01 PM
Guycn2 updated the task description. (Show Details)Mar 3 2018, 9:49 PM
matmarex added subscribers: Anomie, matmarex.

This seems to be a regression from rMW27c61fb1e94d: Add `actor` table and code to start using it. Among other things, it changed the query generated by LogPager.php to always use the 'log_user_text' field for filtering (containing the username or IP), instead of 'log_user_text' for anonymous users and 'log_user' (containing user ID) for registered users. Unfortunately, some history digging reveals that the 'log_user_text' field was only added to MediaWiki in 2009 (rSVN53408), while 'log_user' has existed since 2004 (rSVN4919); looks like the missing values for these five years were never filled in.

The fix for this might be as simple as changing 'false' to 'true' in LogPager::limitPerformer() to allow it to use ids for querying. I don't know if there is any reason why this was disabled, though.

Change 416710 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/core@master] Don't target log_user_text for logged-in users

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

Change 416710 merged by jenkins-bot:
[mediawiki/core@master] Don't target log_user_text for registered users

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

This could also be fixed by running the populateLogUsertext.php script. It seems that that script has never been run for old log entries prior to September 2009.

matmarex closed this task as Resolved.Mar 7 2018, 11:33 PM
matmarex assigned this task to Anomie.
matmarex removed a project: Patch-For-Review.

This has been fixed and the fix is being deployed to Wikimedia wikis with MediaWiki version 1.31.0-wmf.24, per the usual schedule (https://www.mediawiki.org/wiki/MediaWiki_1.31/Roadmap).

Guycn2 added a comment.Mar 9 2018, 7:49 PM

Thanks for fixing.