MyBB Community Forums

Full Version: Polls are broken?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, every time i host a poll and someone votes, it gives warning messages and then continues with the post. Is there anyways I can get rid of these warnings? Attached is a image file.
(2010-11-07, 04:46 PM)MadCatZA Wrote: [ -> ]Hello, every time i host a poll and someone votes, it gives warning messages and then continues with the post. Is there anyways I can get rid of these warnings? Attached is a image file.

You've blanked out part of the warning message so it makes it impossible to read it Confused
(2010-11-07, 04:49 PM)Jack123 Wrote: [ -> ]
(2010-11-07, 04:46 PM)MadCatZA Wrote: [ -> ]Hello, every time i host a poll and someone votes, it gives warning messages and then continues with the post. Is there anyways I can get rid of these warnings? Attached is a image file.

You've blanked out part of the warning message so it makes it impossible to read it Confused

No I haven't? Thats just the directory's going to my hosting space. I don't want people knowing my website URL or how I host my directory's. That's all of the error msg trust me
It only runs that code for guests, you're saying everybody gets that error...??
Yea, everyone, Guests including Registered Members. So, Whats the fix ? Smile
Don't see how that's possible, have you modified this file?? Upload a new copy of it from a fresh download.

Edit: OK this is a bug that'll be fixed in 1.6.1: [Issue #1162]

That should still only be for guests though, this code is only run for guests, you shouldn't be seeing this at all if you're logged in.
Ok im happy you are happy its a bug, but how do i Fix it lol?
Have you uploaded a new copy of the file?? As I've said, this code doesn't even run for logged in users. Look:

elseif(!$mybb->user['uid'])
{
	// Give a cookie to guests to inhibit revotes
	$votes_cookie = implode(',', array_keys($mybb->input['option']));
	my_setcookie("pollvotes[{$poll['pid']}]", $votes_cookie);
}

It only runs if you have no UID, i.e. you're a guest.
(2010-11-07, 07:11 PM)MattRogowski Wrote: [ -> ]Have you uploaded a new copy of the file?? As I've said, this code doesn't even run for logged in users. Look:

elseif(!$mybb->user['uid'])
{
	// Give a cookie to guests to inhibit revotes
	$votes_cookie = implode(',', array_keys($mybb->input['option']));
	my_setcookie("pollvotes[{$poll['pid']}]", $votes_cookie);
}

It only runs if you have no UID, i.e. you're a guest.

Ok then for all interest sake lets just forget registered users. Whats the fix for guests? That's basically my main concern atm since my Forum has guest chat aswell as registered chat.

The fix is on that page I linked to if you look, there's a link to the revision with the fix. What I'm trying to do is find out why members are even seeing this; there must be something different about your forum if this is happening.