Page 1 of 1

Polls Made Simple: Can't Close Polls

Posted: Sun May 18, 2008 10:41 pm
by Ziggywigged
Hello,

I'm using CMSMS 1.2.5 and polls MS 0.2.0. I just closed 2 polls in the admin and it seemed successful but they are not closed on the front-end. You can still vote but admin has them labeled as closed.

Any suggestions greatly appreciated. Thanks.

Re: Polls Made Simple: Can't Close Polls

Posted: Sun May 18, 2008 10:50 pm
by Nullig
Is caching turned off for those pages?

Nullig

Re: Polls Made Simple: Can't Close Polls

Posted: Sun May 18, 2008 11:07 pm
by Ziggywigged
No. Both polls are on the same page and the page is 'Cachable'.

Re: Polls Made Simple: Can't Close Polls

Posted: Sun May 18, 2008 11:41 pm
by Nullig
Try making the page not cacheable.

Nullig

Re: Polls Made Simple: Can't Close Polls

Posted: Mon May 19, 2008 12:10 am
by Ziggywigged
Just tried and they're still open. Even looked at the db entries for both polls and both have a value '1' for 'closed'.

Re: Polls Made Simple: Can't Close Polls

Posted: Mon May 19, 2008 4:10 pm
by Ziggywigged
Anyone else experience this issue? Still can't get them to close.

Re: Polls Made Simple: Can't Close Polls

Posted: Mon May 19, 2008 5:57 pm
by Nullig
I noticed a few bugs in the forge for that version of Polls. Try the earlier one, it might work better.

Nullig

Re: Polls Made Simple: Can't Close Polls

Posted: Tue Jul 14, 2009 9:03 am
by mydom
Hey there,

got the same problem with closing polls. Here is how to fix it:

Open action.default.php
search for:

Code: Select all

$q="SELECT id FROM ".cms_db_prefix()."module_polls WHERE poll_id = ? ORDER BY createtime DESC";
and replace it with:

Code: Select all

$q="SELECT id,closed FROM ".cms_db_prefix()."module_polls WHERE poll_id = ? ORDER BY createtime DESC";

then search:

Code: Select all

if ($this->UserAlreadyVoted($pollid)) {
and replace with:

Code: Select all

if (($this->UserAlreadyVoted($pollid)) or ($row["closed"]==1)) {
Now all polls wich are closed are not votable anymore because the results are shown.