Skip to main content
replaced http://drupal.stackexchange.com/ with https://drupal.stackexchange.com/
Source Link

I have field in content type called field_new_author which is User reference field.

I need to make a Rule to change Node author field to match value in field_new_author. I tryed this solution: Change node author on node save with rulesChange node author on node save with rules

But I'm getting database error: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '4141-0-all' for key 'PRIMARY': 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); Array ( [:db_insert_placeholder_0] => 4141 [:db_insert_placeholder_1] => all [:db_insert_placeholder_2] => 0 [:db_insert_placeholder_3] => 1 [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => 0 ) in node_access_write_grants() (line 3440 of /home2/test/modules/node/node.module).

I also tryed different setups in Rules but could not find anything that would work.

I have field in content type called field_new_author which is User reference field.

I need to make a Rule to change Node author field to match value in field_new_author. I tryed this solution: Change node author on node save with rules

But I'm getting database error: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '4141-0-all' for key 'PRIMARY': 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); Array ( [:db_insert_placeholder_0] => 4141 [:db_insert_placeholder_1] => all [:db_insert_placeholder_2] => 0 [:db_insert_placeholder_3] => 1 [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => 0 ) in node_access_write_grants() (line 3440 of /home2/test/modules/node/node.module).

I also tryed different setups in Rules but could not find anything that would work.

I have field in content type called field_new_author which is User reference field.

I need to make a Rule to change Node author field to match value in field_new_author. I tryed this solution: Change node author on node save with rules

But I'm getting database error: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '4141-0-all' for key 'PRIMARY': 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); Array ( [:db_insert_placeholder_0] => 4141 [:db_insert_placeholder_1] => all [:db_insert_placeholder_2] => 0 [:db_insert_placeholder_3] => 1 [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => 0 ) in node_access_write_grants() (line 3440 of /home2/test/modules/node/node.module).

I also tryed different setups in Rules but could not find anything that would work.

Source Link
hene
  • 468
  • 5
  • 21

Change node author with Rules

I have field in content type called field_new_author which is User reference field.

I need to make a Rule to change Node author field to match value in field_new_author. I tryed this solution: Change node author on node save with rules

But I'm getting database error: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '4141-0-all' for key 'PRIMARY': 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); Array ( [:db_insert_placeholder_0] => 4141 [:db_insert_placeholder_1] => all [:db_insert_placeholder_2] => 0 [:db_insert_placeholder_3] => 1 [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => 0 ) in node_access_write_grants() (line 3440 of /home2/test/modules/node/node.module).

I also tryed different setups in Rules but could not find anything that would work.