Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If a view uses a relationship and a node output in that view does not have that field filled it fails the permissions check.
To reproduce.
1. Two content types, A has node reference field to B
2. View for type A using relationship to type B to show fields for Type B
3. Non-Superuser user has permissions to see both
4. Any type A node without the node reference filled out will not be displayed.
Comment | File | Size | Author |
---|---|---|---|
#2 | fix_view_unpublished_views_relationship.txt | 8.13 KB | Bedstvie |
Comments
Comment #1
breizhbenoit CreditAttribution: breizhbenoit as a volunteer commentedI have disabled "SQL rewriting" in query settings ("Advanced").
It's just a quick fix, if someone have a better solution, I am interested.
Comment #2
Bedstvie CreditAttribution: Bedstvie commentedproblem with hook query_node_access_alter in node module.
fixed in custom module