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.
Views obeys all of the access control rules from the site's overall permissions page. Are the nodes published? Is the permission for 'access content' on for anonymous users? I don't know commerce very well, but is there a 'view commerce products' permission that needs to be turned on for anonymous users?
Turn on 'no results behavior' in views and add a little text in there. If that text is showing up for anonymous users, than EVA is doing its job of embedding the view, but the anonymous user isn't allowed to view any of the content that the view is presenting.
Thanks for the speedy reply. I did as you suggested and created a message for 'no results behavior' and that message did show up. So, I will just have to keep hunting down the access permissions. I suspect it had something to do with the Commerce Product type and the fact that you have to use a Product Display in order to access the actual product nodes.
Sorry I can't be of much more use, but I haven't had much commerce experience. I'd post a similar question to the commerce issue queue or on IRC. Good luck!
If I disable rewriting SQL, all shows up OK. But if I enable it (without any access requirements, as you see in view), I not see it via anonymous. Yes, I think it's permissions issue.
You can contact me via Skype ofryaka, I will give you access in my local copy of production site (dev environment).
I also have an EVA view in a commerce environment which is shown to admin only. I found that in case the view should be generated for another user the db query has a condition '1 = 0' added. This is the reason for an empty result. I currently don't know where this condition is set. Solution from #5 does not work for me. My workaround is using hook_query_alter and unsetting that condition.
In my case the 'view' permission was missing in combination with the nodeaccess Module to render the EVA View. But as the missing 'view' permission is intentionally in this case, my solution was to "Disable SQL rewriting" in the according EVA Views advanced query settings. But think about the implications, when using this feature. This might also apply to some of the above described problem cases.
Comments
Comment #1
mkadin CreditAttribution: mkadin commentedViews obeys all of the access control rules from the site's overall permissions page. Are the nodes published? Is the permission for 'access content' on for anonymous users? I don't know commerce very well, but is there a 'view commerce products' permission that needs to be turned on for anonymous users?
Turn on 'no results behavior' in views and add a little text in there. If that text is showing up for anonymous users, than EVA is doing its job of embedding the view, but the anonymous user isn't allowed to view any of the content that the view is presenting.
Comment #2
mqbeers CreditAttribution: mqbeers commentedThanks for the speedy reply. I did as you suggested and created a message for 'no results behavior' and that message did show up. So, I will just have to keep hunting down the access permissions. I suspect it had something to do with the Commerce Product type and the fact that you have to use a Product Display in order to access the actual product nodes.
I will soldier on.
Thanks again.
Comment #3
mkadin CreditAttribution: mkadin commentedSorry I can't be of much more use, but I haven't had much commerce experience. I'd post a similar question to the commerce issue queue or on IRC. Good luck!
Comment #4
ofry CreditAttribution: ofry commentedI have Commerce Backoffice, so forms displays via Views.
I created custom EVA field with this exported view:
If I disable rewriting SQL, all shows up OK. But if I enable it (without any access requirements, as you see in view), I not see it via anonymous. Yes, I think it's permissions issue.
You can contact me via Skype ofryaka, I will give you access in my local copy of production site (dev environment).
Comment #5
MLZRHi,
I am not using commerce bud expirience the same issue. A view, in my case also a EVA, only works for admin, not for other users.
This solution works for me:
https://www.drupal.org/node/1969208
Comment #6
ferrum CreditAttribution: ferrum commentedI also have an EVA view in a commerce environment which is shown to admin only. I found that in case the view should be generated for another user the db query has a condition '1 = 0' added. This is the reason for an empty result. I currently don't know where this condition is set. Solution from #5 does not work for me. My workaround is using hook_query_alter and unsetting that condition.
Comment #7
geek-merlin> db query has a condition '1 = 0' added
Another access module like nodetype_access?
Comment #8
hevr CreditAttribution: hevr commentedIn my case the 'view' permission was missing in combination with the nodeaccess Module to render the EVA View. But as the missing 'view' permission is intentionally in this case, my solution was to "Disable SQL rewriting" in the according EVA Views advanced query settings. But think about the implications, when using this feature. This might also apply to some of the above described problem cases.
I'm also in a commerce2 setting.