After voting on a poll, it doesnt show the poll results. The page has to be refreshed before i see them.
The button momentarily changes to "Voting.." when its clicked but doesnt change to "Cancel your vote" until page refresh.
I should also note that im display the poll using Views show:content|full content
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | ajax_poll_parent_selector.patch | 735 bytes | mhmd |
| #14 | ajax_poll-update-poll-html-1368064-13.patch | 584 bytes | jenlampton |
| #12 | ajax_poll-update-poll-html-1368064-12.patch | 580 bytes | firewaller |
Comments
Comment #1
quicksketchHave you done any theming to your polls? Changing the HTML markup may break AJAX Poll. Does the AJAX functionality work if you enable the latest poll block? Or when you view the node directly?
Comment #2
tinny commentedI removed all theming to the polls, used the latest poll block and viewed the node directly and it doesnt get updated. It still needs to be refreshed.
Comment #3
quicksketchHm, so you're basically saying that on a fresh install of AJAX Poll, nothing works. Unfortunately I can't reproduce such a problem. I need to be able to know what's causing the breakage in order to reproduce the problem.
Comment #4
udhaya kumar commentedHi
Try the below fix it should resolve your issue.
File - sites/all/modules/ajax_poll/ajax_poll.js
In the above .js file mentioned comment line 16 and add below mentioned line.
Line 16 Commented :
//var $pollWrapper = $form.parents('.content, .poll').filter(':first');
Added line 17 insted the above.
var $pollWrapper = $form.parent('.content, .poll').filter(':first');
http://drupal.org/node/915876
http://drupal.org/files/issues/ajax_poll-915876.patch
Thx
Comment #4.0
udhaya kumar commentedadded more details
Comment #5
jonhines commentedI had a similar issue. I built a fast 1 page site and used the teasers to show all my content. As a result, the parent dom node did not have the "content" class so the $pollWrapper variable was not filled and no content replacement occurred. I fixed the issue by changing line 16 to:
var $pollWrapper = $form.parent();
I realize that this may not work in all cases but it works fine for my use case.
Comment #6
qqboy commented#5 working for me thanks.
i change both #4 and #5 code.
but the strange thing is same module works in a live site but not in my fresh development site.
thanks.
Comment #7
jienckebd commented#5 worked for me too -- thanks!
Comment #8
LoonyLuna commentedWorked for me too! Thanks
Comment #9
LoonyLuna commentedHere is the patch to #5 -- worked well. Thanks
Comment #10
garbo commentedPatch of #5 works!
Comment #11
firewaller commentedThe above patch did not apply. I had an issue with a vanilla Drupal install with an Omega 4 subtheme. Turns out the form parent class changes, so I added it. See updated patch.
Comment #12
firewaller commentedI rerolled the patch from #9. Please ignore my above patch #11.
Comment #13
jenlampton+1 on RTBC
Comment #14
jenlamptonSlight reroll of the patch in #12 since it didn't apply cleanly for me.
Comment #15
mhmd commentedThis patch fixed the issue.
Comment #16
mhmd commentedWhen using most recent block the block title became hidden after submitting the poll, attached patch fixing the issue
Comment #17
sgdev commentedA couple of issues. First, @mhmd, your addition is a patch of a patch. Patches need to be against the module's dev branch, not another person's patch.
Second, this is the *third* patch attempting to solve the same problem. All in various states of acceptance.
This one has been RTBC since 2012, and @quicksketch said he would commit it: https://www.drupal.org/project/ajax_poll/issues/1240768
This one (https://www.drupal.org/project/ajax_poll/issues/1048064) tries to do something very similar, and if #1240768 is committed, it is unnecessary.
I'm fairly certain #1240768 solves all three of these threads.