After updating plugin - PDOException: SQLSTATE[23000]: Integrity constraint violation

Created on 25 May 2015, almost 10 years ago
Updated 8 September 2023, over 1 year ago

After upgrading Drupal and the plugin from an older version, any attempt to create new content results in an error message like the following:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '305-node' for key 'PRIMARY': INSERT INTO {ip_posts} (type, id, ip) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( :db_insert_placeholder_0] => node [:db_insert_placeholder_1] => 305 [:db_insert_placeholder_2] => ip_value_removed ) in ip_posts_insert() (line 330 of /site/path/public_html/sites/all/modules/ip/ip.module).

I found an earlier report of someone experiencing similar which was resolved by removing the module after disabling the module, then re-adding the module. I have tried this with no success. I assume that clearing the IP values would probably resolve this issue, but it should be possible to upgrade the module without needing to clear historic IP data.

🐛 Bug report
Status

Closed: outdated

Version

1.5

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024