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

Daniel E’s picture

Component: Rules Core » Rules Engine

Now 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.

Peter Bex’s picture

Issue summary: View changes

log