0

I have two content types in a project I am working right now. Content type A has a field that hold the user ID of the user that "reserved" a node from that content type. Once the user has reserved a node from Content type A, he/she can then create a node from Content type B referencing the "reserved" node from Content type A. All that is done and working like a charm.

My issue is that I created a View where I want the user to see all the nodes he/she has reserved (Content type A), but I want to exclude the nodes from Content Type A that he/she has already used to create nodes for Content type B. The solution was fairly simple. I added the reserved by field to the contextual filter and I used the ID of the logged user and I added a relationship to "A bridge to the Content entity that is referencing Content via field_USED_FOR_REFERENCE"

The odd thing is that for user 1, the View work like a charm, but for other users the view display a blank page. I have rebuilt the permission, clear the cache, test the preview SQL query with the other users IDs (it does work), but the view page still show me a blank page for any user that is not user 1.

Note: In my tests I have remove all the views permissions without any luck. If I remove the relationship in the views then everyone can see the views results and not only user 1.

What am I missing?

0

Sounds like a permissions issue. User 1 has access to everything, others do not.

What I would do is: 1) Either backup your site, or note (screenshot) what permissions you have set currently 2) Start adding several permissions at a time, and going back to check if the view has changed, until you've exhausted all permissions

  • I have set the views permissions to none and still not luck. Also if I remove the relationship everybody can see the view content. – Emil Orol Apr 14 '14 at 16:13
  • Regarding the last relationship which you are adding, try adding all permissions related to THIS entity. Just because the view doesn't have permission set, doesn't mean that the entity you are relating doesn't have permissions. For example: I had an instance where I related Commerce Orders, to Commerce Line items. No problem at all. Then when I related Commerce Products, everything disappeared, but only for users, not user 1! Similar to you! Then I went through all my permissions, enabling them, and found that I was missing the "View any product of any kind" permission for anonymous users. – gabrielfreiberg Apr 15 '14 at 0:00

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.