Weird bug with a relatively complex D7 setup using admin_views: on the
admin/content page, nodes of one content type ("event") don't show up at all, but only for a specific role ("editor"), even though this role has full access to this type of nodes (create, edit own/all, delete own/all).
If logged in as admin, the "event" nodes appear on this page as expected.
If logged in as editor, the "event" nodes don't appear at all; but nodes of other types show up just fine. Using the filter
Type: Event, gives the "no content available" result.
If I give the editor role the permission "Bypass content access control", then the "event" nodes do appear again on the content page. But this gives the editor access to other types of nodes I don't want him to access...
If I disable the
admin_views module, the problem goes away. (Editor is able to see the "Event" nodes on the content page again.) But since it's a rather complex site, the ability to customize the filters and columns on the content page is quite useful, so I don't want to disable this module.
Visiting the edition page for this admin view (
admin/structure/views/view/admin_views_node), I don't see anything related to user roles, so I don't understand this behavior. I tried with or without Ajax, but no change.
I also tried to clear all caches and clear views cache.
Any idea what's causing this behavior?
After more tests, it seems that this problem is somehow related to the organic groups module, which is also used on this site.
Some content types are intended (configured) to be part of a group, while other content types (such as "Event") are "group-neutral" (not part of a group; they don't even have the field for that). I have configured the node admin view so that users are able to filter nodes based on the name of the group they belong to (obviously this only applies to content type that can be part of a group, but it's OK). For this purpose, I have added the
Entity Reference: Groupe relationship to this view, which then allows to add an exposed filter based on the title of the group.
Removing this relationship solves my problem. But I still don't understand why this happens for one role only.
So in summary: for the "editor" role, the view behaves as if this relationship is required (although it's not the case, I checked in the settings for the relationship), which results in all nodes not part of any group being excluded from the results.
I'll just remove this relationship (and related filter) for now, as I don't really have time to research this further at the moment...