I have created a lot of views on my site (like slideshows, content displays and the like) which upon logout disappears. All of them! I have been scouring the web for days and still haven't found the solution to this and I'm about to jump off the roof of my office building! As far as I remember I haven't touched any default permissions on blocks, views and content displays. I even tried rebuilding the permissions but still to no avail.

The default listing of the contents i.e,

print render($page['content'])

show upon logout but it's the views that keeps tormenting me.

Please help me with this as I'm on a deadline! :(

Comments

drupalshrek’s picture

I'm 90% sure this is a problem of permissions. It's probably that the "authenticated user" has permission to view the views/content, but not the "anonymous user" role. Try giving the anonymous user permission to view everything and it should work.

drupalshrek

alihaideri’s picture

I don't know. I have already checked all the permissions. The "View published content" is checked for all three roles. I have even enabled "Bypass views access control" for anonymous and authenticated users but still my views don't show up!

To put fuel on fire I created a new project and exported my views there but the shocker is that the problem is there too! I created a new view as a test and checked it and that too disappears. I have also tried all combinations of the options of "Access" option in views but nothing works. I think I'm about to kill myself regretting my decision of the usage of Drupal! For the love of everything beautiful for humanity please help me! :'(

spovlot’s picture

Make sure that the Views settings are Access:Permission | View published content (which is the default). Also, after setting the People | Permissions, you might want to clear the cache before logging out to check.

alihaideri’s picture

Did that too. And I clear the cache very often. Nothing works! I'm so doomed!! :'(

spovlot’s picture

So, you tried exporting the Views into a basic Drupal installation? What were the results?

Also, do you have any other permission based modules installed?

alihaideri’s picture

The results were the same. They disappeared upon logout. For the sake of elaboration, I have used Nodequeues in some of them and in the others I have used jCarousel and some are just plain views for taxonomy pages and others. Can there can be any connection with these? I'm just really messed up here!

spovlot’s picture

If you are using Commerce, the problem maybe related to #1276450: Views results empty for unprivileged user when using Relationship: Content: Referenced Product .

The solution seems to be modifying the views

Edit your view > Right column "Advanced" > Query settings : check "Disable Query Rewritting"
--> Disabling SQL rewriting will disable node_access checks as well as other modules that implement hook_query_alter().