Page MenuHomePhabricator

LogEventsList.php's getQueryInfo() INNER JOIN neglects log_user=0, causing deleteBatch.php's 'Delete page script' entries to be skipped
Closed, ResolvedPublic


On the above URL we see the link "Deletion log", but when we go there,
that entry is not there!

Suspecting the Delete page script is a special user,
I even tried adding a "bot" paramater that I read about on .

If there is a way to reveal the hidden item, then it should me mentioned at the top of that Log page!

Also let us follow one of the other links offered:
nothing there either.

Version: 1.15.x
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:25 PM
bzimport set Reference to bz17343.
bzimport added a subscriber: Unknown Object (MLST).

The entry, which will soon roll off RecentChanges, looks like:
1 February 2009

  • (Deletion log); 03:08 . . Delete page script (Talk | block) deleted "分類:157.7780"

However, even a WikiSysop, and even using特殊:Log/delete&hideminor=0&uselang=en
one does not see the entry.

Yes I can confirm the problem only occurs when the user is 'Delete page script'!

Gentlemen, I have found the problem.
Allow us to delete two pages,
$ echo 讀書會|php deleteBatch.php
$ echo 工作坊|php deleteBatch.php -u WikiSysop
Now using index.php?title=Special:Log&type=delete
why can we only see the latter, but not the former?
Allow us to do some queries,
SELECT * FROM wiki_logging ORDER BY log_timestamp DESC LIMIT 2;




We note that the row that doesn't show up in Special:Log&type=delete
is the row with log_user=0.

OK, now let's take a look at LogEventsList.php's function getQueryInfo:
...'INNER JOIN', 'user_id=log_user'...

OK, now let's do a query,
SELECT user_id,user_name FROM wiki_user ORDER BY user_id LIMIT 2;




Do you see what I see?
That's right. There is no user_id=0 present!

In deleteBatch.php there is the line
$user = 'Delete page script';
The problem is there is no such user_name in the user table!

You might say "what's the big deal about that".
Well, the big deal is that 'Delete page script's deletions show up in
RecentChanges. But not in Special:Log&type=delete.

What compounds the frustration is that RecentChanges even has links on
every deletion entry, to Special:Log&type=delete. However, when one
clicks them, one cannot see any entries by the 'Delete page script'

Therefore, please fix things so that
$ echo XYZ|php deleteBatch.php
will make entries in Special:Log&type=delete !
Thank you.

This'll be fixed automatically when bug 3732 is.

This'll be fixed automatically when bug 3732 is.

Sorry. You're wrong.

A more generalized description of the bug (and this transcends several scripts that have a maintenance username) is that they don't have userids since they're not in the user table. What we need to do is cleanup how we handle this pseudo users :)

Fixed with LogFormatter rewrite.