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.
Is that true? I'm trying to get votes from anonymous visitors with cache enabled, but when I visit site as anonymous I can see only rating I gave as an administrator and no options to vote. All permissions is changed to allow...
Comment | File | Size | Author |
---|---|---|---|
#9 | 2014-11-05 20_56_33-Rating.png | 5.2 KB | Shane Birley |
Comments
Comment #1
netikseo CreditAttribution: netikseo commentedAnyone to confirm or deny this?
Comment #2
netikseo CreditAttribution: netikseo commentedHmmm, it says Development status: Under active development, but it's hard to get an answer in a month.
I'm just confused, why anyone would create a voting module that does not allow to vote anonymous visitors....
Comment #3
Martin. CreditAttribution: Martin. commentedConfirming. Rates do not update with pagecache enabled.
Comment #4
hommesreponse CreditAttribution: hommesreponse commentedI can confirm this is happening as well. Just went live with a site and when I turned caching on I wasn't able to vote.
Comment #5
James Haswell CreditAttribution: James Haswell commentedI'm having the same issue here. It really sucks, although it seems to work sporadically.
www.stompinggrounds.com/photo-phriday
Comment #6
Jawi CreditAttribution: Jawi commentedAny progress on this one. I have same issues with the voting and fivestar module. Can not cache views because then stars disappear. Not caching view displays is realy terrible for the performance of our drupal websites.
Comment #7
Shane Birley CreditAttribution: Shane Birley commentedI have noticed this on some of our sites. I can confirm that caching seems to kill the function of that field.
Comment #8
Shane Birley CreditAttribution: Shane Birley commentedUpdating title and have now tested and confirmed that caching is not compatible with the module.
Comment #9
Shane Birley CreditAttribution: Shane Birley commentedI have just noticed this addition to the fields. When I set the author to anonymous on the field also set the field to allow users to vote on their own content, this appears to work as a crude work around.
Update: This only worked for a few hours.
Comment #10
Sifro CreditAttribution: Sifro commentedI'm having the same problem
Comment #11
Huelfe CreditAttribution: Huelfe commentedI'm having the same problem, too. I've tried to combine Fieldblock and Ajaxblocks, but they're not working together. I'll try to write a patch for this and let you guys know.
Comment #12
nicholasThompsonI solved the caching problem for a client site using the following:
However the issue I have just encountered is beyond page caching, I think.. When I voted as anonymous, it was recorded against my IP. After that a colleague viewed the same page but is not allowed to vote (marked as already voted on by anonymous).
Comment #13
eeg CreditAttribution: eeg commentedHey Nicholas, I've created a patch that fixes the problem with only one possible anonymous vote:
https://www.drupal.org/node/2498161
Never got an answer though.
I'm now facing the same problem with caching, as we want to enable the page cache for anonymous users :(
Comment #14
Martin. CreditAttribution: Martin. at ADM Interactive commentedI solved it by reloading the fivestar widget with javascript. It was very specific solution though but the same principle could be applied here. There could be an endpoint which takes in field_type and field_instance_id and then return the html result of that field instance. This should be done automatically for all widgets on the page.
I think #12 is a slippery slope, when you have lots of people rating stuff, then the page cache becomes pointless as it is constantly clearing.
Comment #15
PieterDC#2297231-12: Fivestar Not Working for Anonymous Users with Cache Enabled is indeed not ideal because it clears the whole page from cache.
A more generic solution should indeed be possible, Marin.
Huelfe tried to use existing modules, as explained in #2297231-11: Fivestar Not Working for Anonymous Users with Cache Enabled, but it wasn't working out. Maybe meanwhile both modules do work together. At least https://www.drupal.org/project/fieldblock got updates since his comment.
But I've chosen to try yet another alternative where we don't have to proxy fields through block to be able to load their content via Ajax. https://www.drupal.org/project/authcache :