Spambot works perfectly, but when I try to report a spammer to stopforumspam.com - having configured the proper API KEY - I receive this message:

Notice: Undefined index: cids in spambot_user_spam_admin_form() (line 145 of .../sites/all/modules/spambot/spambot.pages.inc).

Then I'm unable to notify. I had to remove the KEY from the set-up page.

CommentFileSizeAuthor
#4 spambot_undefined_cids_2563143_4_7.patch868 bytessumthief

Comments

francoud created an issue. See original summary.

francoud’s picture

Title: Notice: Undefined cids » Notice: Undefined index: cids
francoud’s picture

Issue summary: View changes
sumthief’s picture

StatusFileSize
new868 bytes

Here is a patch which removes this notice.

kala4ek’s picture

Applied with small changes.

kala4ek’s picture

Version: 7.x-1.4 » 7.x-1.x-dev
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

francoud’s picture

Thanks, it worked!

But now, when I take some action against a spammer (reporting a node) I received this:

Notice: Undefined property: stdClass::$body in _spambot_user_spam_admin_form_submit_action() (line 364 of [...]/sites/all/modules/spambot/spambot.pages.inc).

This is because I tried to report a node; but this node is a special content where there's no "body" defined. I guess that this line in spambot.pages.inc:

if (spambot_report_account($account, $node_hostnames[$nid], $node->title . "\n\n" . $node->body['und'][0]['summary'] . "\n\n" . $node->body['und'][0]['value'])) {

should be modified to check if a $node->body exists, before reporting it?

francoud’s picture

I tried adding this trick before the line 364:

	    if (!isset($node->body)) {
		  $node->body['und'][0]['summary'] = "";
		  $node->body['und'][0]['value'] = "";
		}
            if (spambot_report_account($account, $node_hostnames[$nid], $node->title . "\n\n" . $node->body['und'][0]['summary'] . "\n\n" . $node->body['und'][0]['value'])) {

for me it works...