lesterchan / wp-polls

Adds an AJAX poll system to your WordPress blog. You can also easily add a poll into your WordPress's blog post/page.
https://wordpress.org/plugins/wp-polls/
93 stars 78 forks source link

after submitting a vote as a guest the plugin render the whole Home Page in the poll layout instead of showing the resullt #83

Closed Moumokhtar closed 7 years ago

Moumokhtar commented 7 years ago

i'm having this weird issue, after submitting a vote as a guest or if i press on show result button , after the ajax load i get a duplicate of the site home page rendered in the Poll area, which destroys the layout. if i reload the page the results show just fine, this issue happens only right after submitting a vote with-issue normal-after-refresh

lesterchan commented 7 years ago

Most likely a plugin or theme conflict. Check to see if it works on the default theme without any other plugins activated in the first place.

Moumokhtar commented 7 years ago

yeah it is working with the default theme, i wonder whats the conflict with my custom theme . what could cause the plugin to render all page content including meta tags and scripts in the layout like this ? and only when a guest user is trying to vote, where do you think this conflict may be happening, functions.php file ?

lesterchan commented 7 years ago

Sorry I don't really provide support for conflicts because it is time consuming. I provide the plugin as it is and bugs related to the plugin.

I will keep this issue open for others to contribute.

Moumokhtar commented 7 years ago

i found out what was causing this conflict, i had a function in my functions.php file that redirects non-admins to home page if they tried accessing admin area. i am not sure if i found the optimal solution but it works for me, i added an extra check to this function to check if an ajax call was made too, if not then do the redirect. plugin working great now.