PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'comment-29-0-0-und' for key 'PRIMARY': INSERT INTO {field_data_comment_body} (entity_type, entity_id, revision_id, bundle, delta, language, comment_body_value, comment_body_format) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7); Array ( [:db_insert_placeholder_0] => comment [:db_insert_placeholder_1] => 29 [:db_insert_placeholder_2] => 29 [:db_insert_placeholder_3] => comment_node_program [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und [:db_insert_placeholder_6] => I love Viagra, viagra is awesome and FREE NOW http://www.viagra.com http://www.yahoo.com [:db_insert_placeholder_7] => plain_text ) in field_sql_storage_field_storage_write() (line 448 of [wwwroot]/modules/field/modules/field_sql_storage/field_sql_storage.module).

I can't seem to pinpoint when/why this error comes up, but installing the module fresh on a site, it seems to work well for a while, but invariably I end up getting this error. Once it pops up, I am no longer able to submit any comments (spam or no spam). With my limited experience I would hazard a guess that the error results from improper handling of the comment when it needs to be rejected. Using this module on my production site is not an option until I can be sure this error will not break the site (for now it does, and comments stay broken until I revert to an older version of the database). Any help would be greatly appreciated. I will gladly provide more information if needed.

Comments

cfinke’s picture

Status: Active » Closed (outdated)

I don't believe this is an issue with the AntiSpam module, and it's old enough that it's either fixed elsewhere or irrelevant. Let me know if you can still reproduce it.