I'm currently experiencing two errors with this module.

One non fatal on the user/register page:
WARNING: IMPLODE(): INVALID ARGUMENTS PASSED IN ANTISPAM_FORM_ALTER() (LINE 1533 OF /SRV/WWW/DOMAIN.COM/PUBLIC_HTML/MODULES/ANTISPAM/ANTISPAM.MODULE).

And a fatal one when changing a custom profile field setting (as a normal user):
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.antispam_moderator_email_for' doesn't exist: SELECT * FROM {antispam_moderator_email_for} WHERE uid=:uid; Array ( [:uid] => 1 ) in antispam_user_insert() (line 1568 of /modules/antispam/antispam.module).

Comments

Cheek’s picture

I'm getting the same 'db.antispam_moderator_email_for doesn't exist' error when trying to edit a profile. Any thought on how to fix this?

KD0JEJ’s picture

I am not sure if this is a clean fix or not.....and I'm a little new to the procedures here... but...
I went and hunted down the SQL query in the antispam.module file (at that line number's area), and found that the query was looking for antispam_moderator_email_for... The problem was I didn't see a table antispam_moderator_email_for in the database, so I took the _email_for at the end of the table name off, and it executed like a champ.

Also, I posted a new bugreport, but wasn't sure if it needed to be added to this one instead or if it was to be new. I also in addition to this, once I fixed this issue in my copy of the code, received an Undefined notice. I also got that fixed and described that in the issue report.

Cheek’s picture

Thanks for the tip KD0JEJ! I think you are right. It's working ok now.. I changed antispam_moderator_email_for on line 1568, like on 1551.

I also removed line 1529-1539 in antispam.module, because the message seems unnecessary on the register page.

Frits1980’s picture

Thanx KD0JEJ, worked for me to!

mgifford’s picture

This seems to work for me:

diff --git a/sites/all/modules/contrib/antispam/antispam.module b/sites/all/modules/contrib/antispam/antispam.module
index 57ad43e..54858bb 100644
--- a/sites/all/modules/contrib/antispam/antispam.module
+++ b/sites/all/modules/contrib/antispam/antispam.module
@@ -1571,7 +1571,7 @@ function antispam_user_insert(&$edit, $account, $category) {
     if (!isset($moderator_email_for_options[$edit['antispam_moderator_email_for']])) {
       $edit['antispam_moderator_email_for'] = 'approval';
     }
-    $result = db_query("SELECT * FROM {antispam_moderator_email_for} WHERE uid=:uid", array(':uid' => $account->uid));
+    $result = db_query("SELECT * FROM {antispam_moderator} WHERE uid=:uid", array(':uid' => $account->uid));
     if ($result->rowCount()) {
       // update
       db_update('antispam_moderator')

Someone want to review & RTBC it? Based on version = "7.x-1.1"

pixture’s picture

Assigned: Unassigned » pixture

I will review and update the code.

Thanks everyone for the problem analysis and debugging/testing.

madri2’s picture

Version: 7.x-1.0 » 7.x-1.1
Priority: Normal » Critical

Problem when editing an user :

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'xxxx.antispam_moderator_email_for' doesn't exist: SELECT * FROM {antispam_moderator_email_for} WHERE uid=:uid; Array ( [:uid] => 1 ) dans antispam_user_insert() (ligne 1574 dans xxxxxx/sites/all/modules/antispam/antispam.module).

madri2’s picture

another bugs when posting a link :
Notice : Undefined index: comment dans antispam_comment_view() (ligne 1140 dans xxxx/all/modules/antispam/antispam.module).
Warning : array_merge(): Argument #1 is not an array dans antispam_comment_view() (ligne 1140 dans xxxx/all/modules/antispam/antispam.module).

Dave Cohen’s picture

Status: Active » Reviewed & tested by the community

The fix #5 working for me.

jbeckers’s picture

works for me as well

sylvain_a’s picture

Same error here as #7, but coming from "admin/people/create".
In other words, this is actually crashing the site when trying to create a new user.

jbeckers’s picture

@sylvain_a: is that before or after the proposed fix?

sylvain_a’s picture

This is before.

On the other hand, if the fix is stable, it would be a good idea to publish a new version of the module. I was giving a beginner's workshop, and obviously these people won't patch their modules.

Ideally, it would be good to mention this fix on the project page. But i'm assuming this can only be done by the maintainer...

kmonty’s picture

Status: Reviewed & tested by the community » Fixed

The patch in #5 has been applied in the current dev (looks like it was applied some months ago)

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

removed domain