Topic on Extension talk:BlockAndNuke

ban.php error - column "upload" does not exist

4
Спу́тник (talkcontribs)

My installation:

  • MediaWiki 1.23.6
  • PHP 5.3.3
  • PostgreSQL 9.2.8
  • Red Hat EL 6.5

I have the current (2014-11-10) UserMerge and BlockAndNuke installed.

Try to run the ban.php script:

    # cd ...../mywiki/extensions/BlockAndNuke
    # php ./ban.php
    Starting dry run
    A database query error has occurred.
    Query: SELECT  rc_namespace,rc_title,rc_timestamp,COUNT(*) AS edits  FROM "recentchanges"   WHERE rc_user_text IN ('foo', 'bar', ...)  AND ((rc_new = 1) OR (rc_log_type = "upload" AND rc_log_action = "upload"))  GROUP BY rc_namespace, rc_title ORDER BY rc_timestamp DESC 
    Function: BanPests::getBannablePages
    Error: 42703 ERROR:  column "upload" does not exist
    LINE 1: ...arroderick')  AND ((rc_new = 1) OR (rc_log_type = "upload" A...

Manually merging/deleting individual spam accounts with the Spammer account works fine.

Спу́тник (talkcontribs)

I think the problem may be that I already had a bunch of blocked users before trying to use BlockAndNuke. UserMerge's bugzilla says the bug where blocked users cannot be merge has been fixed, but if I manually try to merge a blocked user, the action fails.

UPDATE: Unblocked all blocked users (except the Spammer, and other legitimate accounts). The ban.php script fails in the same way.

Ciencia Al Poder (talkcontribs)

That's a bug.

At this line:

Change double quotes with escaped single quotes on that line:

From:

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

To:

'(rc_new = 1) OR (rc_log_type = \'upload\' AND rc_log_action = \'upload\')'
Ciencia Al Poder (talkcontribs)
Reply to "ban.php error - column "upload" does not exist"