 | |  | | | Photopost Pro Bug Reports Post post installation PhotoPost Pro problems here. |
October 24th, 2005, 07:43 AM
|
#1 (permalink)
| | Member Verified Customer
Join Date: Dec 2001
Posts: 94
| Votes not counting.
I'm currently running photopost 5.14 and have regular challenges where users can vote for the winner. A user noticed his vote didn't count,and according to the database, he's right.
mysql> select rating from comments where photo = '4974';
+--------+
| rating |
+--------+
| 0 |
| 0 |
| 0 |
| 0 |
| 0 |
| 1 |
| 1 |
| 0 |
+--------+
This shows two users voted for this photo, but it shows only one vote in the Gallery.
|
| |
October 24th, 2005, 08:50 AM
|
#2 (permalink)
| | Member Verified Customer
Join Date: Dec 2001
Posts: 94
|
A small extenstion to this. Once I ended the voting, the vote counts went all over the place. The winning photo went from 6 votes down to 1!
Here's the link to the gallery category: http://www.canadianphotoclub.com/gal...ry.php?cat=677
The winning photo was "fall drops", and still shows 6 "rating"s in the database, but only one vote displayed in the gallery. This is a pretty nasty bug. Users don't like voting systems that don't appear to work. What could be causing it?
|
| |
October 24th, 2005, 10:30 AM
|
#3 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,694
|
Hello your query is not correct that I see as far as votes. Votes are stored as a 1 and added in the photos table.
I show on the page 3 votes is the highest voter
Hitting voting end can not affect votes at all as all it does is set takevotes to 2 which means voting is over. Code: Content visible to verified customers only.
http://www.canadianphotoclub.com/gal...ry.php?cat=677
Now try this query for the one you think is the winner
SELECT rating FROM photos WHERE id='SOMEPHOTOID'
Here is the code in misc.php and we even double check again to make sure the votes are correct Code: Content visible to verified customers only.
As always when someone is running an older version than the current I suggest you upgrade.
|
| |
October 24th, 2005, 10:35 AM
|
#4 (permalink)
| | Member Verified Customer
Join Date: Dec 2001
Posts: 94
|
I stumbled through the code and discovered that it does indeed use the 'photos' table to find the number of votes. The fact remains that when I ended the voting, the winning photo showed 6 votes. How could this have changed? I and several other users were keeping track of the votes, and we all saw this photo with 6 votes this morning.
What is the 'rating' field in the 'comments' table used for then? It shows 6 records with a 'rating = 1' for the photo in question.
|
| |
October 24th, 2005, 10:48 AM
|
#5 (permalink)
| | Member Verified Customer
Join Date: Dec 2001
Posts: 94
|
Partially answered my own question: Code: Content visible to verified customers only.
Running the first query manually, I get the following: Code: Content visible to verified customers only.
Photo 4957 is my winner, and used to show 6 votes on the site. Now it shows one. Code: Content visible to verified customers only.
|
| |
October 24th, 2005, 10:48 AM
|
#6 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,694
|
What does the photos table show? When a vote is inserted it takes a total recount of every vote that is 1 in the rating field of comments and sets the count in there Code: Content visible to verified customers only.
|
| |
October 24th, 2005, 10:51 AM
|
#7 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,694
|
We posted at the same time. Okay well only thing I can suggest is you had a mysql hiccup as the query is pretty absolute here photo 4957 should have been updated to 6 votes
There is no issue that I see with the code.
|
| |
October 24th, 2005, 10:56 AM
|
#8 (permalink)
| | Member Verified Customer
Join Date: Dec 2001
Posts: 94
| Quote: |
Originally Posted by Chuck S We posted at the same time. Okay well only thing I can suggest is you had a mysql hiccup as the query is pretty absolute here photo 4957 should have been updated to 6 votes
There is no issue that I see with the code. | Nor can I.  I'm in the middle of migrating to a new hosting centre and updating the code. I will finish both of those and run some more tests to see if I can locate the problem.
|
| |
October 24th, 2005, 11:01 AM
|
#9 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,694
|
I know your issue
You forgot to reset vote counts when you started a contest. You need to do this to clear normal ratings.
See once someone votes in a contest all ratings over 1 are cleared as they should be. So you where calculating other ratings at the beginning of the contest.
As soon as someone voted it was set correctly.
|
| |
October 24th, 2005, 11:55 AM
|
#10 (permalink)
| | Member Verified Customer
Join Date: Dec 2001
Posts: 94
| Quote: |
Originally Posted by Chuck S I know your issue
You forgot to reset vote counts when you started a contest. You need to do this to clear normal ratings.
See once someone votes in a contest all ratings over 1 are cleared as they should be. So you where calculating other ratings at the beginning of the contest.
As soon as someone voted it was set correctly. | Good theory, but I don't allow normal ratings, so there shouldn't have been any ratings for any of these photos before I started the contest.
When I "enable contest", I'm the first one to vote, after I do, there is only one vote showing, and it's mine. As time goes on and more people vote, the numbers reflect that. Then, a user saw that his vote didn't count, which prompted this thread. Since today was the last day to vote, I "ended" the voting, and it showed 6 votes for the winning photo. An hour or so later, it showed 1 vote for this photo. So my 'comments' table is accurate (as far as I can tell anyways), but my 'photos' table was updated one last time incorrectly.
Last edited by taveren; October 24th, 2005 at 12:02 PM.
|
| |
October 24th, 2005, 12:18 PM
|
#11 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,694
|
I have tested it upways sideways and everywhich way and voting performs as it should
|
| |
October 24th, 2005, 12:44 PM
|
#12 (permalink)
| | Member Verified Customer
Join Date: Dec 2001
Posts: 94
|
I'll open this thread again once I get some migration done and software updated. I'll test in my dev environment too.
Sorry, just to be certain, the 'select photo,count(*)...' query from above should accurately show the number of votes a photo received right, regardless of what the 'photos' table says. I just need to reassure my users.
Just to add another quick comment, I checked the dates in the 'comments' table and they are between the 21st and 23st. Code: Content visible to verified customers only.
Today, the 24th, the Gallery for sure said there were 6 votes for this image, which means at some point, the 'photos' gallery had said that as well.
Last edited by taveren; October 24th, 2005 at 01:04 PM.
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | |
Similar Threads | | Thread | Thread Starter | Forum | Replies | Last Post | | Not counting replies. | jarosciak | Installs and Upgrade - vBulletin 3.0.X | 0 | April 12th, 2005 07:26 AM | All times are GMT -5. The time now is 01:59 PM. | |