I have a set of views based on the normal content nodes. In these views I have to add a field or two from the related product node (for example a pamphlet cover that can vary at the product level).

So - I added a relationship to the associated product and then grabbed the field into the view - image shows up fine.

Note that the relationship is marked mandatory - so nothing will show without the relevant relationship.

At some point (I believe when updating drupal from 7.10 to 7.12 but I'm not sure) - I lost the views content - nothing appears.

After some digging - I found that if I enable either "View any product of any type" or "View any PRODUCT products" for the relevant product then the fields came back and the view displayed data again.

What's worrying me is the sentence "Warning: Give to trusted roles only; this permission has security implications."

So - do I really need to grant anonymous users access to a permission that has this warning just to show info from a field on the product?

The odd thing is - that these fields show up fine on the node view page for the item itself without that permission - it only fails when done via a view. So - I can see the cover image on the actual node page but not in the view.

Since most of our users are anonymous until they buy this means that nearly all content on the store is invisible to them - not great :(

Comments

bojanz’s picture

Status: Active » Closed (duplicate)

Marking as a duplicate of #1276450: Views results empty for unprivileged user when using Relationship: Content: Referenced Product.
In general, I don't actually think it's dangerous at all to grant "view products" permissions.
There was an issue in the queue about removing that warning I think, can't find it now.

chrissearle’s picture

Thanks for the link - can confirm that its a duplicate - and lots of info on that one - will follow it.