I'm having what seems to be the same as this problem -- http://drupal.org/node/614968 -- but in Drupal 7.8 with the the latest dev releases (as of 2 days ago) of Views & Ctools. More specifically, here are some of the details...
* Any Views that I have include the taxonomy Contextual Filters show as blank for anonymous users. User/1 can see these views' rows fine; it seems that various roles of authenticated users can too. But not anonymous users.
* The views that are failing are using the following contexts:
CONTEXTUAL FILTERS
Content: Has taxonomy term ID (with depth)
Content: Has taxonomy term ID depth modifier
* I have multiple other views that have Filter Criteria (i.e., the good old fashion standard filters section of views admin, not the newer Contextual Filters section that are causing this problem) based on taxonomy, but do not include any contextual filters. These seem to display just fine for anonymous users.
* The views that are failing include a grid style page, a table style page, and a teaser list style page.
* I've cleared cache repeatedly.
* I've rebuilt permissions, then cleared cache again.
* There are no access restrictions set on any of the views mentioned above.
I think this just started when I updated to Drupal 7.8 from 7.7 two days ago, but I'm not 100% certain about that.
Comments
Comment #1
dawehnerSome questions which are somehow critical to understand the problem
* Does anonymous user have access to the single node?
* Do you have installed some node acesss / taxonomy access modules on your system?
* Can you provide an export of your view as well as the sql preview?
Comment #2
somatics CreditAttribution: somatics commented* Yes, anonymous has access to the nodes being listed. They have no access restrictions.
* The only access control we are using is Organic Groups Access. Years ago we got into trouble using more than one access control module and have avoided that practice since.
* Here's an export of the view, followed by the preview info provided by the views admin page (I think that's what you mean by SQL preview), for the View instance we've named Page (List).
Comment #3
rucx CreditAttribution: rucx commentedgot similar problem but with relationships: http://drupal.org/node/1276074
Comment #4
somatics CreditAttribution: somatics commentedI wanted to add some additional information I found: It's not just the anonymous that doesn't see the view, it appears to be all user roles other than user/1.
Comment #5
rucx CreditAttribution: rucx commentedwith the newest dev version (as of today) my views started appearing correctly.
Comment #6
Letharion CreditAttribution: Letharion commentedI'm going to close this issue, for two separate reasons.
1) A user has reported it fixed
and, more importantly
2) it can't be fixed in it's current state.
If this error is still around for someone else, you absolutely need to apply some "divide and conquer". There is way to many variables here to figure out what's going on. Clone the view, simplifying it as much as possible until the error can no longer be reproduced, so that it can more easily be understood where the problem occurs.
Comment #8
dropbydrop CreditAttribution: dropbydrop commentedAfter updating to 3.4 rss data do not appear to anonymous users.
I tried also the todays' dev version but no result.
Going back to 3.3 fixes the problem!
What new feature of 3.4 could introduce the problem?
Comment #9
couturier CreditAttribution: couturier commentedAre you able to follow the instructions in comment #6 to help us figure this out?
Comment #10
dropbydrop CreditAttribution: dropbydrop commentedI try to figure out.
Did anything change related to permissions since views 7-3.3?
Comment #11
somatics CreditAttribution: somatics commentedI don't remember where I found the issue resolution, but somewhere there's a post regarding Views or Drupal Commerce that IIRC solved this problem for me and many others. I can't remember how to explain this very articulately, but here's the gist: Apparently, when there is a relationship of the sort that includes Taxonomy depth, permissions can't track through the layers of relationships properly. I can show the View, but not the records being queried through the relationship on the View, so it shows blank.
The way to fix this is to go to Query settings under Other settings on the admin page for the View, and check the box for "Disable SQL rewriting".
This will prevent Drupal from checking node_access when it runs the query for the View. It means that the View can show records to a user who shouldn't see them, so you have to carefully set your filters for the View to limit them correctly and specifically -- but it works like a charm for the problem I had. I've had to do it for several Views with relationships, and it has worked every time.
Try it and see if it this fixes your problem too, and then we'll know if we're talking about the same thing. If so, perhaps we have some more information for this issue, as per #6, and we can get everyone closer to finding a real solution that doesn't require Disabling the SQL Rewriting.
Comment #12
dropbydrop CreditAttribution: dropbydrop commentedthat's another issue what i have
Comment #13
cogno CreditAttribution: cogno commentedI've been having the same issue, and this workaround solved my problem. What flummoxed me was that my taxonomy term view pulls in two content types and fields for one of them showed up fine, but not the other.
Comment #14
a.ross CreditAttribution: a.ross commentedHaving the same issue, the workaround in #11 fixes it for me as well.
My view also has a relationship to the product bundle and I'm also using Commerce. It turns out that the error disappears when I remove that relationship.
Comment #15
guy_schneerson CreditAttribution: guy_schneerson commentedThis is not a views issue but a commerce one.
The problem is the "View any product of any type" permission that's not set by default.
I tested this on two non commerce sites and the view works fine.
see Views results empty for unprivileged user when using Relationship: Content: Referenced Product
If anyone gets this issue on a view that doesn't link in the commerce product then please re-open
Comment #16
guy_schneerson CreditAttribution: guy_schneerson commentedSorry it should be "works as designed" and not a "duplicate" as the duplicate issue is on another project
Comment #17
_sania CreditAttribution: _sania commentedis it really dangerous to let any user view any product if yes, explain why, please
Comment #18
matthewv789 CreditAttribution: matthewv789 commentedI had a similar problem, and it was not that nothing showed up, but rather than when selecting any category other than "All" in the exposed filter, anonymous users would always see the same results, as if it had permanently cached the results for one particular category and was always using that. Everything worked fine while logged in, though, and even anonymous users could still click "All" to see all the results. I made sure to turn off Views caching for this View, but it made no difference. Enabling or disabling "Use Ajax" also made no difference.
Disabling SQL rewriting under Query Settings (per #11) fixed this issue for me as well, though I worry about other issues coming up (like seeing unpublished content in this area?) It's not super sensitive content so I'm not TOO worried, but this does seem like a bug of some kind. (I am not using Commerce or any unusual entity type, just a standard content type and taxonomy.)
Comment #19
hockey2112 CreditAttribution: hockey2112 commented#11 fixed it for me! Thanks!
Comment #20
NWOM CreditAttribution: NWOM commentedI can confirm that this problem is not isolated to the Commerce module. My environment does not have Commerce installed and #11 fixed this. This is similar to what @matthewv789 said.
More information: I'm able to reproduce mine with an Entity Reference field used as a Relationship, and in turn having fields display from that Relationship. If the entity reference does not exist, then the view is only viewable by admin, however the moment the entity reference exists, results are shown by other users as well.
Comment #21
Jabastin Arul CreditAttribution: Jabastin Arul commented#11 fixed it for me too!!
Please see below link:
https://www.drupal.org/node/1276450
Its also same issue....
Comment #22
Jabastin Arul CreditAttribution: Jabastin Arul commentedComment #23
NWOM CreditAttribution: NWOM commentedAs explained in a prior comment and by others, this does not necessarily affect only people with the Commerce module. I do not have the Commerce module installed, and #11 fixes the issue.
Comment #24
Anonymous (not verified) CreditAttribution: Anonymous as a volunteer commented#11 is still the bomb.
Thanks!
Comment #25
dkrockville CreditAttribution: dkrockville as a volunteer commentedDisabling sql-rewriting in views advanced did not work for me.
Any other ideas?
Drupal 8.6.4
When an anonymous user views the node page, the taxonomy term is not visible. All other roles can view that term.
Comment #26
dkrockville CreditAttribution: dkrockville as a volunteer commentedComment #27
couturier CreditAttribution: couturier as a volunteer commentedPlease forgive me if I have missed something, but since Views is now in core for Drupal 8, why are we moving this issue out of the 7.x queue?
Comment #28
MustangGB CreditAttribution: MustangGB commentedWhat @couturier said, open a new issue for D8 in the core queue if you wish, this was already answered for D7.
Comment #29
xurizaemon@somatics, from someone using Drupal 8.8 in 2020, thanks for your comment from 2012 - disable SQL rewriting did the trick for me too.
Comment #30
robert_t_taylor CreditAttribution: robert_t_taylor as a volunteer and commented+1 on #11. Thank you!
Comment #31
tce CreditAttribution: tce commented@somatics thanks for the advice in #11, this helped me fix my issue
Comment #32
seedmeAu CreditAttribution: seedmeAu as a volunteer commented@somatics thanks for the advice in #11. However isn't this is now handled by a module called "Permission by Term"? I am using V9.2.x and could not find a settings called "Disable SQL rewrite", which according to #stackoverflow is now called disable Access Check. I only find such setting within this module.
The reason I responded to this old discussion is that we also run into similar issue with displaying a view - teaser provided by gavias_view from Gavis_theme using Gavias Owl Carousel. The rendering of display randomly fails for anonymous till the cache is cleared manually.
Please kindly advise should I get the mentioned module here installed and see if that resolve the issue? - being reluctant of doing so as trying to minimise modules involved.