I am using inbuilt Poll Module in my website. I have set the permission so that anybody including anonymous user can vote and view the results. Anonymous users are getting Access Denied error when they try to view results of the poll. Please Help.

Comments

justjuank’s picture

I also discovered this issue today, even the admin can't have access to the poll results, and i've already set the permissions in the configuration.

Does your admin user can see the results?

Starbuck’s picture

This is funny. I just added my "me too" to request review of an issue where we can't prevent visitors from viewing results. I'd like your problem. haha
#1084782: Core Poll module allows visitors to see more data than expected

mototribe’s picture

same problem here.

mattsmith3’s picture

same issue here.. this is in core. any help?

leymannx’s picture

Stumbled upon the same problem when I wanted to redirect some anonymous users to see only the results of a poll depending on what email address pattern they entered in a form before. So I thought sending them to node/%nid/results would be fine and somehow it also worked AS LONG AS for testing purpose I didn't vote before (as other anonymous user with allowed email address pattern). Then the IP got stored somehow and when accessing the poll node you automatically get the results view presented WHILE AT THE SAME TIME the node/%nid/results URL gets unavailable.

firewaller’s picture

This seems to be an issue caused by poll_load(), which sets $poll->allowvotes = FALSE; when a user has already voted (includes anonymous settings). Then the _poll_menu_access() callback checks allowvotes and denies access. I'd recommend a similar workaround as the /votes menu callback argument $inspect_allowvotes.