Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Polls Are Broken. [Solution]

Not a big deal but thought you should know

https://gyazo.com/295eb2b6c04cbaea3cc94a...0bf6b070cf

most of these are off by 1/2
Yeah, I know they are jacked. Never really tried to fix it. Unsure why polls aren't working 100% either. I don't really care enough about polls. Grrr....I'll fix it one day.
(Feb 21, 2017 05:46 PM)Omniscient Wrote:  Yeah, I know they are jacked. Never really tried to fix it. Unsure why polls aren't working 100% either. I don't really care enough about polls. Grrr....I'll fix it one day.

It wouldn't have anything to do with users with special characters in their name would it? In that screenshot provided one name stands out with special characters, which means that's 11/12 of those have regular usernames.
(Feb 21, 2017 08:46 PM)xadamxk Wrote:  For some reasons polls that are private usually have issues too.
The polls will say one thing but the actual numbers (viewable to moderators) are off.

Good catch with the special characters, that seems to be what's going on.

Was trying to find public polls earlier to see if it was possible but there are barely any. It's either just a coincidence or it could be a factor.

https://hackforums.net/polls.php?action=...s&pid=5108
[Image: ymLxCZz.png]

3-5 Hours - A5 has special characters, so that's 6/7 people with regular usernames
More then 9 - ryan and swift have special characters, 13/15 people with regular usernames

BUT

7-9 Hours - Anubis and Blackhat have special characters, but the count is correct.
The reason this one worked was because I accidentally put multiple vote on so people could vote multiple times. Whenever I have turned this off the polls have been broken.

Solution: When you make a poll tell people to only vote once while multiple vote is on, lousy solution as people will ignore but that's what I can do for now.
This has been broken for a long time. If we really need to count replies we have a userscript that counts the usernames and changes the vote count if it really matters (e.g. in MotM).
Whats the problem I cannot seem to understand?
(Feb 22, 2017 04:13 PM)Crystallize. Wrote:  Whats the problem I cannot seem to understand?

The reason this one worked was because I accidentally put multiple vote on so people could vote multiple times. Whenever I have turned this off the polls have been broken.
So by this logic, that would mean that the MOTM polls in the past inaccuracy could've led to a false winner?
(Feb 23, 2017 03:11 AM)Sir Wrote:  So by this logic, that would mean that the MOTM polls in the past inaccuracy could've led to a false winner?

No, mentors and staff can view the members who voted and use a userscript to accurately count the true results. Mentors often post updates on the accurate vote counts in the threads
(Feb 23, 2017 03:23 AM)SIM-2015410 Wrote:  No, mentors and staff can view the members who voted and use a userscript to accurately count the true results. Mentors often post updates on the accurate vote counts in the threads

Okay about to say, if it actually fucked with the end results and a wrong member was rewarded in the past that would be pretty shitty.
Does this bug happen on both multichoice and singlechoice polls? The current counts seem to be correct here

Based on whats happening, it seems like the `votes` column in mybb_polls is different from the number of votes in mybb_pollvotes. Not sure why that could be though after looking through the MyBB source. Does this problem happen on other forums too, or just HF?
A basic fix would be to force a count of the number of rows in mybb_pollvotes every time someone votes, but it would be more elegant to actually find the exact problem
Meh, maybe I'll look into why it doesn't count correctly. I've always been fearful it's query caching and that's something I don't want to mess with. Really don't care a lot about polls but I'll see what I can do. I knoew years ago I worked on them.
(Mar 7, 2017 11:43 PM)Omniscient Wrote:  Meh, maybe I'll look into why it doesn't count correctly. I've always been fearful it's query caching and that's something I don't want to mess with. Really don't care a lot about polls but I'll see what I can do. I knoew years ago I worked on them.
200th Post!

Ahh, okay then that's cool. I'd say if you need any help hmu but I think there are people out there better fitted for the job. Also, do I get a bug finder award or something..that was a joke haha!

Anyway, good luck on fixing the polls for future members.


A bug finder award or some money to upgrade would be nice haha :P
/polls.php?action=showresults&pid=5109

Is there a way to count the commas in these polls and add one to get the total count?


Possibly Related Threads...
Thread / Author Replies Views Last Post
by IenaosAug 10, 2015 04:39 AM 1 155 Aug 10, 2015 04:39 AM
Last Post: Doctor Blue
by Peppermint ButlerJun 6, 2014 11:36 PM 3 236 Jun 6, 2014 11:36 PM
Last Post: Omniscient
by TutelarySep 5, 2013 05:36 PM 29 899 Sep 5, 2013 05:36 PM
Last Post: The Doctor