0

I'm attempting to create a view showing all the nodes that a user is referenced in (via a CCK user reference field in a multigroup). Because they are multigroups, a user may be referenced multiple times within a single node and within the same field. I have a view working that displays each occurrence properly (and contains multiple rows per node if need be). Everything looks great when an admin loads the view (or anyone with "administer nodes" permission). However, when someone without the "administer nodes" permission loads the view, it gets limited to only 1 row per node, even if the user is referenced several times.

The users have full access to view all the nodes listed in the view, and all the nodes are published.

I've been troubleshooting this for several hours and haven't gotten anywhere besides realizing that "administer nodes" is the issue (which I obviously don't want to give that permission to normal users).

Anyone know why users without "administer nodes" permission only see a limited view??

I'm on Drupal 6 using Views 6.x-2.16.

  • 1
    My guess would be that an access module is adding extra SQL to the query when a regular user is viewing the page, and this is screwing with how the results are returned. If this is the case, the fix will likely involve some tricky PHP to further rewrite the query correctly. – Alfred Armstrong Aug 25 '14 at 14:22
  • Ok, so I turned on "administer views" for one of my user roles and looked at the query for a user without the "administer nodes" permission. It appears that views is adding a DISTINCT clause in the query, as well as grouping by the nid. How can I determine where this is coming from?? – EJK Aug 25 '14 at 16:43
  • I actually just discovered where this was happening by narrowing it down to a specific module. This site is running open atrium (it's an intranet site), and in the Atrium module, there is a function that automatically sets the view as 'Distinct' unless uid = 1 or they have the "administer nodes" permission. It states that this is included to solve some other issues. Should be able to tweak it now. Thx. – EJK Aug 25 '14 at 18:42
  • OK, brilliant. Glad to be of help. – Alfred Armstrong Aug 26 '14 at 8:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.