So I'm running 1.6.4, and I've got issues with the poll. My members can't vote, the poll disappears after trying to vote, and it's really just stupid.
Anyway, I do have AJAX Poll Voting installed, which I don't know but it seems like it may have caused the problem, but deactivating it just gave me a white page when voting, which is really confusing.
Any help?
If it's disappearing you must have non-default code running, have you run the file verification tool??
(2011-07-28, 06:31 PM)MattRogowski Wrote: [ -> ]If it's disappearing you must have non-default code running, have you run the file verification tool??
No I haven't. Anyway, it stops disappearing after disabling the AJAX Poll Voting plugin, but I get a blank page when voting after that.
I'll run the tool.
Well the only file that I know I didn't modify is inc/class_parser.php, the other two were inc/functions.php which I edited to get Google SEO working, and jscripts/editor.js, which I edited to fix the text box problem.
Ok I just checked it on a board without the AJAX Poll Voting plugin and running 1.6.4, it's got the same issue...I think something went wrong when you guys fixed that poll vulnerability
That was simply adding a post key to the request, which isn't going to break anything. Polls work just fine here:
http://community.mybb.com/thread-100119.html
Run the find updated templates tool, are any templates listed here??
Yeah showthread_poll was changed apparently.
Old code:
<form action="polls.php" method="get">method="post">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<input type="hidden" name="action" value="vote" />
<input type="hidden" name="pid" value="{$poll['pid']}" />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td colspan="4" class="thead" align="center"><strong>{$lang->poll} {$poll['question']}</strong></td>
</tr>
{$polloptions}
</table>
<table width="100%" align="center">
<tr>
<td><input type="submit" class="button" value="{$lang->vote}" /></td>
<td valign="top" align="right"><span class="smalltext">[<a href="polls.php?action=showresults&pid={$poll['pid']}">{$lang->show_results}</a>{$edit_poll}]</span></td>
</tr>
<tr>
<td colspan="2"><span class="smalltext">{$publicnote}</span></td>
</tr>
</table>
</form>
New code:
<form action="polls.php" method="post">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<input type="hidden" name="action" value="vote" />
<input type="hidden" name="pid" value="{$poll['pid']}" />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td colspan="4" class="thead" align="center"><strong>{$lang->poll} {$poll['question']}</strong></td>
</tr>
{$polloptions}
</table>
<table width="100%" align="center">
<tr>
<td><input type="submit" class="button" value="{$lang->vote}" /></td>
<td valign="top" align="right"><span class="smalltext">[<a href="polls.php?action=showresults&pid={$poll['pid']}">{$lang->show_results}</a>{$edit_poll}]</span></td>
</tr>
<tr>
<td colspan="2"><span class="smalltext">{$publicnote}</span></td>
</tr>
</table>
</form>
Also it seems that AJAX Poll Voting needs to be updated to support the change.
Polls are working now
<form action="polls.php" method="get">method="post">
That was the reason. The code change also forced the request to be a post and not a get (forgot it also made that change) but without the change it would be submitting the vote with the wrong request type, thus it wouldn't register it.