I dont understand where the problem is from...

I am using CCK, Views, Node access and nodeaccess user reference.

A user creates a node and can reference himself and other users to add permissions(view and edit).
When the user is listing nodes in a custom view, the node that he created referencing himself is list 2 times, other users 1 time.

Any ideas ?

Comments

danielb’s picture

Is there no option in Views to remove duplicate nodes?

PePiToO’s picture

I already tried the remove duplicate nodes in the views but it doesn't work.

The strange thing is that it is displayed 2 times only in the author's view, not the other users.

danielb’s picture

sorry I don't know why that is happening, could it be to do with how the view is configured??

bitsantos’s picture

I've been experiencing this problem too. I did a little detective work and found that using this module (possibly also because of my use of the nodeaccess module) makes Views add an additional table join in its SQL query that doubles each result row.

SQL has never been my forte and I've never found the time to dive into Drupal's node access and the Views module, so I'm not sure how exactly that happened and how it can be fixed. Anyway, the relevant SQL table join is:

INNER JOIN node_access na ON na.nid = node.nid

I captured the View query and played around with it. Removing that join (and the relevant WHERE conditions) took away the duplicate entries.

Anyone have ideas?

bitsantos’s picture

Status: Active » Closed (duplicate)

I think this is a duplicate of http://drupal.org/node/468958

ressa’s picture

The problem is with Views: I updated to 6.x-2.8 (2009-12-03) and the doubles are gone.