Last modified: 2013-04-19 10:20:51 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T19053, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 17053 - Hiding log entries with RevisionDelete does not automatically hide the corresponding page history entry
Hiding log entries with RevisionDelete does not automatically hide the corres...
Product: MediaWiki
Classification: Unclassified
Revision deletion (Other open bugs)
All All
: Lowest normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: schema-change
Depends on:
Blocks: SWMT 15644
  Show dependency treegraph
Reported: 2009-01-17 18:07 UTC by Happy-melon
Modified: 2013-04-19 10:20 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Happy-melon 2009-01-17 18:07:49 UTC
When we perform actions that are logged in [[Special:Log]], a null revision is usually (not always, eg user rights changes) made in the history of the affected page with the same data as the log entry.  These entries should obviously be considered interchangeable, so when a log entry is hidden, the corresponding null revision should have the same hiding settings applied to it, and vice versa. For pagemove results, hiding one entry should probably also affect the equivalent entries for the other page.  Essentially, whenever multiple records are created together, they should be treated as one record for the purposes of RevisionDelete.
Comment 1 Alex Z. 2009-01-18 06:44:43 UTC
Not sure if there's an efficient way to do this. I don't think there's any correlation between the log entry and the null revisions made, except maybe the timestamp, but from a quick test, these aren't guaranteed to be exactly the same down to the second.
Comment 2 Happy-melon 2009-01-20 08:56:10 UTC
Well you can pick them up based on timestamp and confirm by comparing the summaries, or we could try to link them; maybe we could use rev_parent_id to link to the log entry, although I'm not 100% sure what that's used for, and there's no reciprocal arrangement (although we couldn't set reciprocal links without three database commits anyway).  Remember that these are not arbitrary: if you're hiding a log entry, you *know* how many null revisions are associated with it - for a protect/unprotect/modifyprotect, there's one and for a move there's three - the corresponding move log entry for the other end of the move, and null revisions in both pages' histories.  It shouldn't be too hard to locate these and track them down.
Comment 3 Alex Z. 2009-01-20 23:04:30 UTC
The problem is that the summary in the page history is dependent on a system message, which can be edited, so also can't be guaranteed to be consistent.

And as I said, there's no guarantee that timestamps are going to be the same, if you have a protection-conflict on a page, you might have 1 null revision made at the same time a different protection log entry was created. You could compare the user to the log, but its still adding more convolutions.

The fact that you know how many null revisions there are doesn't really help all that much. If there's only 1 it makes it easier, but it doesn't really help in establishing a relationship between a log entry and a revision.

The only thing I can see that would distinguish a log-null-revision from a normal edit is that rev_len is null, though this is null (I think) for all revisions before it was implemented (sometime in the last couple years I think), so could potentially have issues with older wikis. Also, I'm quite sure if its supposed to be null now, or if that was just an omission when adding the column (null revision adding uses a different function than real revision adding). If its the latter, then its not a reliable option for future revisions either.

The other, potentially big, problem, is that logs, since they can apply to deleted and non-existent pages, as well as special pages, use titles rather than pageids. So when a page is moved, the null revisions from the history are now associated with one title (revisions use pageid), while the logs will be associated with another. So when searching for the null revision, it would have to check if the page has been moved, then check if that page has been moved, etc. New pages can be created over the old title though, potentially causing more problems (and those can be moved and the title resused, etc, etc)

It would also have to check the archive table for deleted revs, if it can't find it in the revision table.

Doing it the other way around, searching from null revision to log entry would have the same problems.
Comment 4 Aaron Schulz 2009-03-23 22:24:35 UTC
This won't be possible in the foreseeable future. Several tracking schema changes would be need for log->revision, revision->log and logging tracking for log/delete,log/suppress.

For now, we can just check the history links given at revisiondelete.
Comment 5 Mark A. Hershberger 2011-12-20 21:00:36 UTC
resetting assignee

Note You need to log in before you can comment on or make changes to this bug.