Hi,

I get the following error when using rules to add a list of approved users to a nodeaccess_userreference entity reference field.

The exact same rule works fine for a different node.

I've searched around and I can't seem to find what to do next. If anyone has any ideas as to how I can drill down into what is causing this, I'll be hugely grateful.

Thanks.

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '6611-431-nodeaccess_userreference' for key 1: INSERT INTO {node_access} (nid, realm, gid, grant_view, grant_update, grant_delete) VALUES ( Large Array Here ) in node_access_write_grants() (line 3551 of /var/www/ssws/modules/node/node.module).

Comments

kingswoodute’s picture

I have just found that if I move the rule from "after saving new content" to "before saving new content" it works fine.

themosttogain’s picture

Kingswoodute = LEGEND.

That solved my problem after hours of searching for solutions!

danielb’s picture

Issue summary: View changes
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.