• myFAV.ES
  • Help Center
  • Tutorials
  • Extensions
  • Blogs

  

  • Logos
  • Logo Requests
  • Themes
  • Backgrounds
  • Forums
  • Contact
Home » Blogs » My blog » 02282013 » Voting System Problems (FIXED!)

Voting System Problems (FIXED!)

Efreak15 —Thu, 02/28/2013 - 15:26

Currently the voting system for voting up/down on posts and logos is not working. The matter is being looked into, and hopefully a solution will appear soon.

UPDATE: The voting system should be working properly now. Thanks to gumanov for fixing the problem:)

  • Efreak15's blog
  • Log in or register to post comments or vote.
  • +6
  • 6 votes

Comments

chiaroscuro's picture

Re: Voting System Problems

Submitted by chiaroscuro on Fri, 03/15/2013 - 01:26

You posted this on Feb 28 and there is one positive vote

This is strange as voting has not been working

  • log in or register to post comments
chiaroscuro's picture

Re: Voting System Problems

Submitted by chiaroscuro on Fri, 03/15/2013 - 01:31

How come this Logo has a vote
It was posted March 14 !!

http://www.userlogos.org/node/16686

  • log in or register to post comments
chiaroscuro's picture

Re: Voting System Problems

Submitted by chiaroscuro on Fri, 03/15/2013 - 01:38

Deva's Logo here from March 12 has a vote

http://www.userlogos.org/node/16677

  • log in or register to post comments
chiaroscuro's picture

Re: Voting System Problems

Submitted by chiaroscuro on Fri, 03/15/2013 - 02:01

Is this then a permissions issue rather than an API issue or what ?

  • log in or register to post comments
chiaroscuro's picture

Re: Voting System Problems

Submitted by chiaroscuro on Fri, 03/15/2013 - 02:39

G

Was it you that managed to make a vote on the coinbase logo ?

  • log in or register to post comments
chiaroscuro's picture

Re: Voting System Problems

Submitted by chiaroscuro on Fri, 03/15/2013 - 06:39

I notice on userscripts.org

That if one hovers the cursor over the down triangle on the voting widget one can see the link to the simple up/down/node/1

In all other logos that I can find this is not the case

Similarly sometimes the down goes to the link, sometimes the up

Also the down widget is coloured and on most Logos it is not

And the colour of the down switches on and off

So the widget itself seems to be semi working

But why only this logo and not others ?

  • log in or register to post comments
gumanov's picture

Re: Voting System Problems

Submitted by gumanov on Fri, 03/15/2013 - 08:17

Yes, I am the one who has been making votes on some logos.
They are test votes, I am working on the voting system.
It is not permissions related.

I tracked the issue down to a PHP function.
I am referring to the isset() function.
http://php.net/manual/en/function.isset.php

The simple up/down module will disable the up/down arrows under the following conditions:
1) User role is not set to allow voting
2) The user has already made a vote (the appropriate button will be disabled, while the opposite one stays enabled)

The issue is coming from option 2.. When the module verifies whether or not you have already made a vote, it uses the isset() function.
If a user has voted, the php variable "$vote" has a value of either -1 or +1, which means it is SET.
If the user has not voted, this variable is an empty database array, but it should still be considered SET.

For some reason it's having trouble verifying this variable, I'm not sure why.

If you HAVE VOTED, it works correctly, and allows you to change your vote, like it should. So isset($vote) returns TRUE.
But if you have NOT VOTED, it thinks that an empty array value in $vote refers to NOT SET, so isset($vote) is returning a FALSE value.
I don't know why...still investigating.
According to the PHP documentation, an empty array value SHOULD still be considered SET. The only time a variable should be considered NOT SET is if it has a value of NULL.

  • log in or register to post comments
chiaroscuro's picture

Re: Voting System Problems

Submitted by chiaroscuro on Fri, 03/15/2013 - 08:41

Wow G thanks for your very detailed reply and the link

Sounds like you are getting close to resolving this issue

Congratulations :-)

  • log in or register to post comments
gumanov's picture

Re: Voting System Problems

Submitted by gumanov on Fri, 03/15/2013 - 10:20

FIXED.

The issue was a setting with MySQL.
When I upgraded servers I set up the site to use MySQLi instead of MySQL (the i stands for "improved" version")

Turns out that a database query to MySQL that results in no data returns the value "FALSE" for the isset() php function.
But for MySQLi (improved version) it will return a NULL value instead of FALSE.

I switched the site back to MySQL, problem solved.

  • log in or register to post comments
Efreak15's picture

Re: Voting System Problems

Submitted by Efreak15 on Fri, 03/15/2013 - 10:25

Excellent job gumanov!

  • log in or register to post comments
Efreak15's picture

Re: Voting System Problems (FIXED!)

Submitted by Efreak15 on Fri, 03/15/2013 - 10:28

Edited the post.

  • log in or register to post comments
chiaroscuro's picture

Re: Voting System Problems (FIXED!)

Submitted by chiaroscuro on Fri, 03/15/2013 - 10:50

FIXED.

The issue was a setting with MySQL.
When I upgraded servers I set up the site to use MySQLi instead of MySQL (the i stands for "improved" version")

Turns out that a database query to MySQL that results in no data returns the value "FALSE" for the isset() php function.
But for MySQLi (improved version) it will return a NULL value instead of FALSE.

I switched the site back to MySQL, problem solved.
»

Good work G

Difficult problem to identify

This will make a big difference on the site

Vote +1 :-)

  • log in or register to post comments
chiaroscuro's picture

Re: Voting System Problems (FIXED!)

Submitted by chiaroscuro on Fri, 03/15/2013 - 10:54

Hey it works !!!

  • log in or register to post comments
Deva's picture

Re: Voting System Problems (FIXED!)

Submitted by Deva on Fri, 03/15/2013 - 12:47

Congrats gumanov, nice work!

  • log in or register to post comments

Search logos

Search site

Navigation

  • Blogs
  • Forums
  • Online users
  • Recent content

User login

  • Create new account
  • Request new password
 
  • Changelog
  • Latest releases
  • Important links
 
 
  • Changelog
  • Latest releases
  • Important links
  • Support Forum
 

Top Rated

  • google.com
  • youtube.com
  • fast dial folder
  • wikipedia.org
  • Firefox Black
  • fd folders, folders, folder
  • generic gaming logos
  • mail.google.com, gmail.com, googlemail.com
  • Carbon Fiber
  • iphone app style icon template
more

Recent Polls

  • What are you resolution of screen use
  • Which version of Fast Dial do you run?
  • How often do you visit Userlogos?
  • Which FD iPhone logo format do you find preferable
  • How many themes do you run in Fast Dial ?
more

Online users

There are currently 0 users online.
Active - 15 mins:
No registered users :(
  • Last 24 hours

Recent comments

  • This article was written by a
    by: sijiv31759
    4 hours 14 min ago
  • This is a smart blog. I mean
    by: sijiv31759
    6 hours 3 min ago
  • Positive site, where did u
    by: sijiv31759
    7 hours 15 min ago
  • Thanks for a wonderful share.
    by: sijiv31759
    8 hours 49 min ago
  • seooo
    by: jameseoo
    10 hours 16 min ago
  • seooo
    by: jameseoo
    10 hours 17 min ago
  • seooo
    by: jameseoo
    10 hours 26 min ago
  • I love visiting sites in my
    by: sijiv31759
    1 day 19 sec ago
more

Recent topics

  • Buy Aurogra 100mg Online
  • Radio Online Horen
  • Buy Cenforce 200 mg tablets Online
  • Fildena 50 - sex activity sildenafil creation
  • Cecotec Cumbia Power Matic-ccino 6000
  • Handle Your Sexual Life Using Vidalista 60
  • Where can I find reviews of youtube tv?
  • Buy Cenforce 150mg tablets Online
more

Top contributors

User Total user points
Mafia_Penguin 912
Deva 552
gumanov 490
jumpordie 471
Karmody 457
macleod.mac 402
ingalls 354
spaljeni 310
zigzag 290
Rog 265
Sastre 256
famecky 159
x-b 152
danger83 147
1air2philou 143
more

2008-2017 userlogos.org. All logos/images belong to their respective owners. Contact administrator.

  • Logos
  • Logo Requests
  • Themes
  • Backgrounds
  • Forums
  • Contact