Extension talk:BlockAndNuke/Flow

About this board

From Mark, developer of the newer BAN
Some people are reporting that this extension still fails to produce the expected results for them. To help you resolve these issues, I need detailed problem reports. Specifically:
  • MediaWiki version
  • MySQL version
  • Operating system
  • Output of any commands you run
  • If you are trying to use the Special page, add the following to the top of your LocalSettings.php and tell me what errors or notices appear:
error_reporting( -1 );
ini_set( 'display_errors', 1 );


rc_user and rc_user_text Deprecation

6
Coolguy3289 (talkcontribs)

Since MW 1.32 the following database tables have been deprecated and replaced with rc_actor. The plugin still tries to use rc_user and rc_user_text. Can a hot-fix be written to accommodate the new version? I have a massive spam cleanup to conduct and unless there is a suggestion for another user/post cleanup plugin like this, I'm a bit stuck.

SheldonBole (talkcontribs)
Coolguy3289 (talkcontribs)

I haven't, and prior to you posting that link, I've never heard of Phabricator.

SheldonBole (talkcontribs)

haha, ok.


I worked a bit on a solution. However, got derailed by a lack of needing this functionality again.


I was at the point of fixing the errors after the submit button on blocking and nuking the user. I don't know if that makes sense. I try to spend some time on Friday's debugging various open source tools that I use. I'll try look into this again tomorrow.


We should probably report it at Phabricator too...

SheldonBole (talkcontribs)
SheldonBole (talkcontribs)
Reply to "rc_user and rc_user_text Deprecation"

Users blocks but pages not deleted?

3
Chuck.Kahn (talkcontribs)

Users are being blocked I can see in Special:BlockList but I don't see any pages being deleted. Do pages not count as contributions?


MediaWiki 1.31.1

PHP 7.3.11 (apache2handler)

MySQL 5.6.42-log

ICU 64.2

Chuck.Kahn (talkcontribs)

If I click the back button and run it again on the same users, then the pages get deleted.

Chuck.Kahn (talkcontribs)

Can't nuke IP addresses. For example, if I select 101.51.141.49 and try to nuke I get this message:

[XnmWuANldoPo@zuGh-6UjAAAABw] 2020-03-24 05:12:25: Fatal exception of type "InvalidArgumentException"

Reply to "Users blocks but pages not deleted?"
Treebytron (talkcontribs)

I see that this is unmaintained and that compatibility isn't listed for MediaWiki 1.32.0 (what we're using). We're having trouble with BlockAndNuke on our install and I wonder if it's better to just look for another tool or to troubleshoot this one.... thanks!

MarkAHershberger (talkcontribs)

You could file a bug and harass someone who has touched it (me ;) to fix it.

Treebytron (talkcontribs)

Thanks Mark :), we might try that! Instead of harassing you... would you perhaps have the bandwidth to consult on this project for us? Seems like a fairly straightforward spam cleanup but just a bit over our heads... I'm at trav @ spacebase.co if you want to discuss... thanks!

Reply to "analogue for 1.32?"

Exception encountered, of type "InvalidArgumentException"

5
Dog1994 (talkcontribs)
Posysikiw (talkcontribs)

I get the same error with a fresh install of 1.3 and BlockAndNuke.

Product Version

MediaWiki 1.30.0

PHP 5.6.31 (litespeed)

MySQL 5.6.29-76.2-log

OS: Linux (hosted by whois.com)

BlockAndNuke 1.1

Throws this exception with your code in LocalSettings.php:

[WroANAVkmqAABQRzHrAAAABG] 2018-03-27 08:26:31: Fatal exception of type "InvalidArgumentException"

CaseyMills (talkcontribs)

I'm also getting this error. At this point it might be easier to uninstall MediaWiki and reinstall. Some bot put a ton of pages on my Wiki, filling my hosting space and SQL server. I really wish this worked.

CaseyMills (talkcontribs)

I worked with this extension a little more and found out a few things. This extension VASTLY underestimates the volume of users and content that needs to be deleted. I had thousands of accounts created by a bot, and even more pages in the Wiki. If I selected a couple dozen users the process would successfully complete. Although I had to run the program on the list of users twice to delete all the content.

Unchecking thousands of users to run this extension twice on small groups took forever. Yes, I used the click+shift method to uncheck all the boxes.

After successfully blocking and deleting the content the user names still showed up in the list. Which required me to remember the beginning and ending user name in a list of thousands.

2600:1005:B14A:211F:45B2:71F5:2207:C8B6 (talkcontribs)

go to file BlockAndNuke.body.php

and change

Xml::check( 'names[]', true,

to

Xml::check( 'names[]', false,


This creates the list with the names all UNCHECKED.


I hope that helps!

Jason

Reply to "Exception encountered, of type "InvalidArgumentException""

Works with current MW versions?

1
MarcoAurelio (talkcontribs)

Will this extension work with our current WMF MW branch?

Reply to "Works with current MW versions?"
2003:5B:E607:8300:840F:468:613A:2CC6 (talkcontribs)

If you get an error like "rc_timestamp must appear in the GROUP BY clause or be used in an aggregate function", then change line 104 of BanPests.php to

   'GROUP BY' => 'rc_namespace, rc_title, rc_timestamp'

instead of

   'GROUP BY' => 'rc_namespace, rc_title'.
Reply to "PostgreSQL error"

1.29 error with newest BlockAndNuke and UserMerge patch

3
Jburk (talkcontribs)

Hi,

I have a Mediawiki install that's been patched up to 1.29 and I installed BlockAndNuke for the first time, along with the UserMerge patch mentioned in the BlockAndNuke article. I am getting the following error when trying to use the extension with my current set of spam users.

Catchable fatal error: Argument 3 passed to MergeUser::__construct() must be an instance of IUserMergeLogger, none given, called in /home/xxx/xxx/extensions/BlockAndNuke/BanPests.php on line 163 and defined in /home/xxx/xxx/extensions/UserMerge/MergeUser.php on line 33

Jburk (talkcontribs)

MediaWiki version 1.29

MySql version 5.6.34

OS Ubuntu 12.04

Jburk (talkcontribs)

I was able to fix this on my own by changing line 163 in BanPests.php:

FROM:

$um = new MergeUser( $spammer, $user );

TO:

$um = new MergeUser( $spammer, $user, new UserMergeLogger() );

Reply to "1.29 error with newest BlockAndNuke and UserMerge patch"
Cmjohannes (talkcontribs)
Ciencia Al Poder (talkcontribs)

It has been fixed on current master, but the backport for REL1_23 hasn't been merged yet.

I've updated the notice on this extension's page with the current status. Feel free to apply the changes on Gerrit change 139593 on your code to fix it until this change gets merged

Cmjohannes (talkcontribs)

Okay, that fixed the infinity () error.

Now, I'm having issues getting the spam accounts to merge into User:Spammer and then, those accounts to be deleted. I do have the UserMerge extension installed and it is working properly.

Keep an eye on this UserMerge bug, particularly with wiki installs, which have had the ipbwiki bridge extension previously.

Cmjohannes (talkcontribs)

My versions are listed above.

Problem: BlockAndNuke is trying to nuke users I have on my whitelist. I have about 4,000 accounts that I'm trying to Nuke. I have about 500 users on the whitelist. Most are early in the database with user_id < 500. A few on the whitelist have user_id > 4000. BlockAndNuke is still trying to delete these users with user_id > 4000. I can see when I open Special:BlockAndNuke in the browser that these user_id > 4000 are listed to be deleted.

AriMartti (talkcontribs)

I noticed same. I had about 25000 users to ban and about 350 users to save. In BanPests.php there is line "$file = fread( $fh, 200 );" which I change to "$file = fread( $fh, 8192 );" and problem doesn't exist anymore. http://php.net/manual/en/function.fread.php

I'll do BUGREPORT as soon as possible.

Reply to "Reporting error"

Users Already Block&Nuked Still in List

1
MAHR88 (talkcontribs)

When going to blockandnuke special page, a user list appears. The user list grows and grows, and always includes members that have already been blockandnuked. Will this eventually slow down the system too much with scrips until it won't function? My list has about 20-30 on it now, and it requires 3-5 minutes to complete, and one refresh of browser. Also there is no 'check all' 'uncheck all' feature.. So the only way to manually choose to blockandnuke unblocked members is by unchecking them all.

I think two solutions are to include a 'uncheck all' function in newer version, or don't populate the list with already blocked users.

Please let me know if there is already a workaround to this I don't know about.

Reply to "Users Already Block&Nuked Still in List"

Redirect loop

9
Summary by Ciencia Al Poder

See current workaround in this reply

EFFemeer (talkcontribs)

I'm getting this error

The webpage at http://drebbel.net/wiki/Special:BlockandNuke has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.

Installed software

Entry point URLs

Installed skins

Installed extensions

Installed libraries

Ciencia Al Poder (talkcontribs)

Inspecting the responses from your server, I see this:

http://drebbel.net/wiki/Special:BlockandNuke 302
http://drebbel.net/wiki/Special:Blockandnuke 301
http://drebbel.net/wiki/Special:BlockandNuke 302
http://drebbel.net/wiki/Special:Blockandnuke 301
...

It may be a bug in the extension, but the different HTTP responses 301 and 302 seems to indicate one of them is being done by the Apache webserver itself, where PHP is not involved, probably caused by a bogus redirect rules or Mod Alias

EFFemeer (talkcontribs)

Thank you very much for your help. Unfortunately my browser is not as explicit as yours. I only get "has resulted in too many redirects." I've played around with .htaccess to no avail. Puzzling!

Do you happen to know a way to find out at which level the redirect occurs? I have no command line access to my server.

Ciencia Al Poder (talkcontribs)

Uhmmm, well, it seems the extension is indeed broken. I've installed it and had the same problem.

To fix it I edited the file called BlockandNuke.php adding the following:

$wgHooks['LanguageGetSpecialPageAliases'][] = 'ban_onLanguageGetSpecialPageAliases';
function ban_onLanguageGetSpecialPageAliases( &$specialPageAliases, $langCode ) {
        $specialPageAliases['blockandnuke'] = array( 'BlockandNuke' );
}

Pinging @User:MarkAHershberger so he's aware of the bug

MarkAHershberger (talkcontribs)

Thanks... Sorry for taking so long on this. Fixing.

EFFemeer (talkcontribs)

Works fine now. Thank you very much. I couldn't find anything.

60.231.17.114 (talkcontribs)

Fixed it for me too thanks Ciencia

AlFrame (talkcontribs)

Fixed it for me too.Thanks!! BUT: [StartRant]Just wasted about 5 hours to get this to work. I only noticed once I started looking at the page with chrome. Firefox Only told me that the page is not redirecting correctly. With this text as keyword search on google and the Apache error log text I wasn't able to find this solution. Chrome then gave me the "too many loops" error. Using that as a keyword on my search finally got me here... I downloaded the extension today. This fix is here for over a month and not yet implemented... The workaround works. BUT it's a workaround. At least this solution should be put as a link to the download page of the extension?[EndRant]

MarkAHershberger (talkcontribs)

I think the download is fixed, nowww.

Reply to "Redirect loop"
Return to "BlockAndNuke/Flow" page.