After enabling the module I get following error when I try to add a new node;

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.body' in 'where clause': SELECT s.*, e.body_value AS body FROM {antispam_spam_marks} s INNER JOIN {field_data_body} e ON e.entity_id = s.content_id WHERE (s.content_type = :db_condition_placeholder_0) AND (s.hostname = :db_condition_placeholder_1) AND (s.mail = :db_condition_placeholder_2) AND (e.body = :db_condition_placeholder_3) LIMIT 1 OFFSET 0; Array ( [:db_condition_placeholder_0] => node [:db_condition_placeholder_1] => xx.xx.xx.xx [:db_condition_placeholder_2] => info@mysite.com [:db_condition_placeholder_3] => <p>test</p> ) in antispam_node_validate() (line 894 of /var/mysite/sites/all/modules/antispam/antispam.module).

For the record, I crossed out my ip and site that was mentioned in the error.
Is this is mysql issue? I'm not sure what is going on...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pixture’s picture

FileSize
3.08 KB

Thanks for the bug report. I will fix it with the next release. (to be released within a few days).

Until then, please apply the attached patch and use it. It has several other minor bug fixes too.
This patch should fix your issue.

Thanks,

vadim s. sabinich’s picture

Issue tags: +antispam, +akismet

i use akismet.
=
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM antispam_spam_marks s INNER JOIN comment c ON s.content_id = c.cid WHERE ' at line 1: SELECT FROM {antispam_spam_marks} s INNER JOIN {comment} c ON s.content_id = c.cid WHERE (s.content_type = :db_condition_placeholder_0) AND (s.hostname = :db_condition_placeholder_1) AND (c.comment = :db_condition_placeholder_2) LIMIT 1 OFFSET 0; Array ( [:db_condition_placeholder_0] => comment [:db_condition_placeholder_1] => 82.146.37.23 [:db_condition_placeholder_2] => йфйф ) in antispam_comment_presave() (line 1014 of /home/user375875/data/www/sabini.ch/sites/all/modules/antispam/antispam.module).
=

muffinista’s picture

I'm also having this problem. The patch doesn't help it.

dthomas731’s picture

* subscribe *

pixture’s picture

I will look into it. Give me some time. Thanks,

mgifford’s picture

I haven't tried the patch, but want to report:

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM antispam_spam_marks s INNER JOIN comment c ON s.content_id = c.cid WHERE ' at line 1: SELECT FROM {antispam_spam_marks} s INNER JOIN {comment} c ON s.content_id = c.cid WHERE (s.content_type = :db_condition_placeholder_0) AND (s.hostname = :db_condition_placeholder_1) AND (s.mail = :db_condition_placeholder_2) AND (c.comment = :db_condition_placeholder_3) LIMIT 1 OFFSET 0; Array ( [:db_condition_placeholder_0] => comment [:db_condition_placeholder_1] => 206.248.191.99 [:db_condition_placeholder_2] => conman@incompetence.com [:db_condition_placeholder_3] => Some nonsense here. ) in antispam_comment_presave() (line 1013 of /DRUPAL7/sites/all/modules/contrib/antispam/antispam.module).

When trying to approve a comment.

pixture’s picture

Please try the attached patch. This patch includes all the fixes in the previous patch in the post #1.

Thanks,

mgifford’s picture

Downloaded it, patched it:
patch -p0 < antispam_module_2011_02_17.patch

Seems to work. But I nixed some bad comments so more testing is needed on it for sure.

10basetom’s picture

I just applied antispam_module_2011_02_17.patch to version 7.x-1.1, but it still gives me the following error whenever I go into my user profile and click the Save button:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'xxx.drupal_antispam_moderator_email_for' doesn't exist: SELECT * FROM {antispam_moderator_email_for} WHERE uid=:uid; Array ( [:uid] => 1 ) in antispam_user_insert() (line 1574 of ... antispam.module).

madmage’s picture

Having this same issue with editing my user account as well.

Jody Lynn’s picture

Comment #9 is a different issue and was fixed in #1356974: PDOException when removing admin role

Jody Lynn’s picture

Status: Active » Needs review

I believe the patch in #7 still needs review.

marcoscano’s picture

Issue summary: View changes
Status: Needs review » Postponed (maintainer needs more info)

Patch doesn't apply, and I suspect this is not even an issue anymore, since it is so old. Setting it to postponed until someone can confirm it exists with the current -dev verision, and can provide steps to reproduce.

apaderno’s picture

Issue tags: -, -akismet
apaderno’s picture

Version: 7.x-1.0 » 7.x-1.x-dev