I am getting the following alerts on node-referenced nodes (view and edit tab) that the authenticated user doesn't own.

"user warning: Duplicate entry '4-3-nodeaccess_autoreference_owner' for key 'PRIMARY' query: INSERT INTO node_access (nid, realm, gid, grant_view, grant_update, grant_delete) VALUES (4, 'nodeaccess_autoreference_owner', 3, 1, 1, 0) in C:\websites\mw.usgin.org\mw\modules\node\node.module on line 2254."

My node/user-reference structure is:
- The Collection content type has one userrefernce field (Curators) with mandatory and unlimited entries.
- The Metadata content type has one nodereference field to the Collection content type (one mandatory entry).

Curators for one collection appear to be able to edit any of the collection's metadata nodes even when they do not own it. User-1 does not get any of the warnings.
What could be wrong?

Comments

wgrunberg’s picture

Interestingly, I get duplicate ID/record SQL error messages when using the Node Access Auto Reference module.

kenorb’s picture

Status: Active » Postponed (maintainer needs more info)

Can you export your content types? (using Content Copy module)
I'll try to reproduce it.

wgrunberg’s picture

@kenorb Sorry, I have moved on to using Organic Groups to implement and manage shared permissions. It will be taking me some time to restore a previous development snapshot.

kenorb’s picture

Not a problem.
Maybe somebody will have similar problem.

kenorb’s picture

Category: support » bug
Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

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

jimurl’s picture

Title: Duplicate entry for "4-3-nodeaccess_autoreference_owner" warning » Simiilar Duplicate entry problem
Version: 6.x-1.x-dev » 6.x-1.1-beta1

I am getting a similar problem with this error: "user warning: Duplicate entry '454-402-nodeaccess_autoreference_owner' for key 'PRIMARY' query: INSERT INTO node_access (nid, realm, gid, grant_view, grant_update, grant_delete) VALUES (454, 'nodeaccess_autoreference_owner', 402, 1, 0, 0) in /home/visions/public_html/modules/node/node.module on line 2267."

... using the 6.x 1.1-beta version, drupal 6.20

However, it does appear to grant access properly.

If I 'Rebuild permissions' then the problem goes away for a single 'page view' by one of the users; but the error returns after that.