So I've been trying to fight this error for like 8 hours now.
Create a rule:
- Event: After saving new content
- Actions: Set a data value
BOOM PDOException: SQLSTATE[23000] bla blah sorry but my head really hurts right now
Edit: Here is the entire glorious error message:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '201-5-content_access_rid' for key 1: INSERT INTO {node_access} (nid, realm, gid, grant_view, grant_update, grant_delete) 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, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11); Array ( [:db_insert_placeholder_0] => 201 [:db_insert_placeholder_1] => content_access_rid [:db_insert_placeholder_2] => 5 [:db_insert_placeholder_3] => 1 [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => 0 [:db_insert_placeholder_6] => 201 [:db_insert_placeholder_7] => content_access_rid [:db_insert_placeholder_8] => 3 [:db_insert_placeholder_9] => 1 [:db_insert_placeholder_10] => 0 [:db_insert_placeholder_11] => 0 ) in node_access_write_grants() (Zeile 3392 von /home/www/web200/html/sites/evocura/modules/node/node.module).
Comments
Comment #1
Daniel E commentedNow I'm actually setting the value before I save the node, but store it in a global so I can use it in a condition in the step after. Yikes. But it works.
Comment #2
Peter Bex commentedDuplicate of #1499176: Integrity constraint violation: 1062 Duplicate entry and #1146248: Integrity constraint violation at node_access when saving a node on node insert (see also core issue #1146244: node_access integrity constraint violation on module_invoke_all('node_' . $op, $node);)
Comment #2.0
Peter Bex commentedlog