[Solved] Catalog view shows no items for anonymous users
Hi all,
I have an installation here where anonymous users don't get products displayed on the catalog views. The "manufacture" taxonomy view works fine though.
I also noticed that as a logged in user if you visit a top catalog category - let's say "Kids" - there are no items displayed from the sub-categories (i.e. "Toys", "Books" etc.). Did I miss something?
What I already tried without success:
- rebuild the perms
- clear all caches, explicitly the views cache
- give the block access control: show published content (instead of giving the block no restrictions at all)
I found out that anon users can access the regular taxonomy views (i.e. taxonomy/term/1
), but not the catalog view (i.e. catalog/1
). I guess I just miss a simple thing...
I will take a look at the database now but it would be awesome if somebody could help me or has an idea what the problem could be.
Thank you!
Comments
First answer to myself:
Problem: If you visit a top catalog category - let's say "Kids" - there are no items displayed from the sub-categories (i.e. "Toys", "Books" etc.).
Solution: Go to the catalog view, "advanced" in the right column. Under contextual filters, set "Content: Has taxonomy Term ID with depth" from "0" to "1" (or deeper if needed).
Second answer to myself
Phewwww, that was hard. Got it!
Problem: Anonymous users don't get products displayed on the catalog views.
The permission problem IS a bug that exists in combination of Views and Commerce (http://drupal.org/node/1276900#comment-4980066)
Solution: Edit the View > "Advanced" > "Query settings" > check "Disable Query Rewriting".
query rewriting
"WARNING: Disabling SQL rewriting means that node access security is disabled. This may allow users to see data they should not be able to see if your view is misconfigured. Please use this option only if you understand and accept this security risk."
is this a valid solution?