I get the following error when I try to update a static page's content as an Administrator:

"The website encountered an unexpected error. Please try again later."

In the logs, there is an error for type 'node' and type 'php':

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '3' for key 'PRIMARY': INSERT INTO {pinit} (nid, description, image, pincount) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3); Array ( [:db_insert_placeholder_0] => 3 [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => /sites/default/files/Steve155.jpg [:db_insert_placeholder_3] => horizontal ) in drupal_write_record() (line 7166 of /home/diversif/public_html/includes/common.inc).

I just updated to the latest version of Drupal, and ran the update script on the database. I also created an authenticated user, and confirmed that they are experiencing the same issue.

I'm not modifying anything in the content other than some text. Are there other logs that I can look into to find the source of the problem, or the solution.?

1 Answer 1


Looks like an error with the module


It's inserting a duplicate row for nid into it's database table.

It should probably use db_merge instead.

You may need to raise a bug report with the module maintainer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.