Page MenuHomePhabricator

Special:Nuke does not list imported pages, as they aren't in recentchanges table
Open, LowPublic

Assigned To
None
Authored By
maiden_taiwan
Feb 27 2007, 9:30 PM
Referenced Files
F3892: Nuke_9120.patch
Nov 21 2014, 9:40 PM
Tokens
"Like" token, awarded by Liuxinyu970226."Like" token, awarded by Reception123.

Description

Special:Nuke does not work for pages that were imported with Special:Import.
These pages simply don't get listed (in the checkbox list) when you search for
the username under which they were imported.

Here is a sample import that does not show up when you search for the username
under which it was imported (in this case, WikiSysop, which happens to be uid = 1):

<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.3/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.3/
http://www.mediawiki.org/xml/export-0.3.xsd" version="0.3" xml:lang="en">

 <page>
    <title>My new topic</title>
    <revision>
      <contributor>
        <username>WikiSysop</username>
        <id>1</id>
      </contributor>
      <text xml:space="preserve">
{{stub}}

[[Category:MyCat]]
      </text>
    </revision>
  </page>
</mediawiki>

Details

Reference
bz9120

Event Timeline

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

I am guessing that Special:Import does not update the recentchanges table, so
Nuke doesn't know about imports.

cameronem wrote:

I have the same situation but running with MediaWiki 1.12. I have also checked in the Special:Recentchanges page and the imported pages do appear there. I also ran select * from recentchanges; and there are log entries in the table for the imports.

Would definately appreciate some ideas on getting this working. In case they are interlinked - I also experience the same behavior as bugzilla ID 14725 (same article title listed numerous times with different edit counts).

mike.lifeguard+bugs wrote:

(In reply to comment #2)

I am guessing that Special:Import does not update the recentchanges table, so
Nuke doesn't know about imports.

To do so, do we need a hook for import? That'd be bug 11539 or bug 11537.

webmaster wrote:

Nuke actually queries for imported pages, but the line

'(rc_new = 1) OR (rc_log_type = "upload" AND rc_log_action = "upload")'

in file SpecialNuke_body.php must be changed to

'(rc_new = 1) OR (rc_log_type = "import" AND rc_log_action = "upload")'

as the log type is called "import" (http://www.mediawiki.org/wiki/Recentchanges_table#rc_log_type). That seems to do the trick - at least the pages show up for Nuke.

webmaster wrote:

Patch as described in comment 5

Attached:

r70005

Thanks for the Patch :)

  • Bug 25607 has been marked as a duplicate of this bug. ***

reverted in r82823. This doesn't distinguish between imports to already existing pages, and newly created pages, and only newly created pages. Also breaks listing file uploads.

till wrote:

Still a problem in 1.16.2.

I'm not sure we can or should fix this bug.

What if an import took place (which imported pages created on another wiki by a certain username, a username that does not exist on the the local wiki), then a vandal creates an account with that name and creates a bunch of spam pages.

An admin wants to nuke the spam pages, and only pages created by that user should be affected, not the imported pages.

If it were some other function I wouldn't find it as much of an issue, but since the Nuke extension is especially created for vandalism related cases, I think it's a blocker.

Proposing WONTFIX.

Hm... a possible work around would be to have the Nuke-extension get pages from recentchanges by user id, instead of username (and get user id from user table).

Krinkle: How about making an option (checkbox) to "Also delete imported changes"?

I think this bug only really makes sense if you want to delete all the pages imported by the user importing them (as opposed to by the user listed as the author)

*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*

sumanah wrote:

Marking patch reviewed. Frank, do you have time to revise it, and interest in doing so? Thanks.

  • Bug 30141 has been marked as a duplicate of this bug. ***

T33858 would solve this by using the revision table (which might be overkill).

Nemo_bis renamed this task from Special:Nuke does not list imported pages to Special:Nuke does not list imported pages, as they aren't in recentchanges table.Mar 6 2015, 11:47 AM
Nemo_bis set Security to None.

Any updates on this? It would be nice to allow Nuke to delete imported pages.

DannyS712 edited subscribers, added: DannyS712; removed: wikibugs-l-list.

Why do you ship this crap with MediaWiki if it doesn't work? This ticket is up from 2007 and the issue remains.