Forgive me if I am posting this in the wrong place. I am having a problem with the poll module o nmy site, www.thePRguy.com. When a vote is submitted and the page refreshes with the updated poll results, a random page, usually from my Amazon.com store module, is loaded. Sometimes the results can be quite comical or embarrasing. Does this have a fix?

CommentFileSizeAuthor
#24 poll_block_cache-782300-24.patch521 bytesmdupont
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

venusrising’s picture

I too have the same issue as we just enabled polls on our site. Anonymous user permissions, checked , poll disabled/re-enabled, cache from DB flushed still not registering anonymous votes and sometimes sending to random page, in our case a view page

venusrising’s picture

Priority: Normal » Critical

I too have the same issue as we just enabled polls on our site. Anonymous user permissions, checked , poll disabled/re-enabled, cache from DB flushed still not registering anonymous votes and sometimes sending to random page, in our case a view page

treehacker’s picture

I have the same issue here. I'm using the latest poll block on the right sidebar and on the that sidebar I also have a quicktab. Maybe the problem has to do with that?!

mariano.barcia’s picture

Subscribing. I'm having the same issue with anonymous visitors being redirected to random page after casting a vote in the latest poll block. It's interesing that, just like treehacker, I'm using quicktab and the "latest poll" block on a panel in home page. Sounds like a good hint for where to start looking... BTW, I'm also using boost. Any ideas?

ndstate’s picture

Category: support » bug

I am having the same issues also. I am also using Boost, quicktab (though for other content), and the latest poll block.

Any ideas on how to solve this.

tanhaa’s picture

has there been any fix to this issue? Or any suggestions? I'm going to assume this is related to cache. Not using Boost, but having the same issue recently with anonymous voters being sent to random pages.

It used to work fine, just started a few days ago .. not sure what may have changed. The only recent modules installed were Twitter/OAuth

The problem only occurs when using the latest poll block.

gdoteof’s picture

also have this problem; not limited to anonymous users though

brizone’s picture

so, we basically have no functional Poll module for Drupal right now?

miopa’s picture

Version: 6.16 » 6.20

Same issue, subscribing.

Ganginator’s picture

Issue tags: +critical

I am having the same issue. I'm subscribing, but according to the posts this has been an issue for months? Will we ever get an answer?

venusrising’s picture

Still the same issue for us too

Rameez’s picture

Same issue, subscribing.

Rameez’s picture

I found alternative solution by installing ajax poll module. It will skip reloading of page and user will be on same page after voting.

lastnico’s picture

Same problem here with Drupal 6, subscribing!

http://www.forum-software.org/vote-for-best-forum-software-of-2011

ericpai’s picture

Same issue, subscribing.

ericpai’s picture

The poll is putting an incorrect form action for the poll form.
It seems that disabling block cache fixes the issue for now.

jackal1234’s picture

Respect to you. fix this problem...

dilanke.kumara’s picture

I checked this issue in my local site.But I haven't get this problem in my site.According to my knowledge this issue comes because of the permissions problem in poll module.First check the "inspect all votes" permission in poll permissions .

gandhiano’s picture

I can confirm this issue and it is not permissions related (at least not in the way dilanke.kumara mentioned it). I will continue to work on this for a website in the next days - if someone would have a clue on where to start looking, would be a big help.

gandhiano’s picture

Version: 6.20 » 6.22

Bug is still existing as of current version

bsfajardo’s picture

I'm having the same issue. Disabling block cache solved for now!
Subscribing...

reload’s picture

I can confirm disabling the block cache, work around works.

mdupont’s picture

poll_block() doesn't define any $block['cache'] value so the default is used : BLOCK_CACHE_PER_ROLE. If the block is cached, it will be cached with $form['#action'] set to the first page it was displayed on, causing a redirect after form submission. That's why disabling block cache fixes the issue since $form['#action'] is recalculated each time.

Setting $block['#cache'] to BLOCK_CACHE_PER_ROLE|BLOCK_CACHE_PER_PAGE should fix the issue

mdupont’s picture

Version: 6.22 » 6.x-dev
Status: Active » Needs review
FileSize
521 bytes

Patch attached.

mdupont’s picture

Title: Poll module: vote submission loads random page » Poll block is not usable when block cache is enabled
Issue tags: -critical
Andreyy’s picture

#24: poll_block_cache-782300-24.patch queued for re-testing.

Status: Needs review » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.