voting is broken? voting is broken?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

voting is broken?

Started by martl, March 12, 2006, 11:30:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

martl

i have a gallery running (you can check it out at http://www.tourgalerie.de/gallery

last week i upgraded from 1.20 RC2 to 1.4.4 stable.

I also reset all recent votes. registered users are allowed to vote.

Now i have the following phenomenon:

The Gallery registers all given votes correctly. But the calculated resulting vote seems to be broken for some reason, so that in  the "displayimage" screen the table row entry for Votes gives wrong values.

For example. that overall diplay for this picture tells me "Rating: (4 Votes) <5 stars>"
http://www.tourgalerie.de/gallery/displayimage.php?pos=-135

but when you check out the details, you'll see there is a different number of votes given (more) and the calculated value is also wrong.

there have the following manipulations done from me:

- i deleted a double vote entry from both cpgd_vote_stats and cpg11d_votes
- i wanted to know which userID voted what, so i added a table row to cpg11_vote_stats to put that in, and added the italicized pieces to "ratepic.php"


[i]$m_username = stripslashes(USER_NAME);[/i]

// Insert the record in database
$query = "INSERT INTO {$CONFIG['TABLE_VOTE_STATS']}
                  SET
                    pid = $pic,
                    rating = $rate,
                    Ip   = '$_SERVER[REMOTE_ADDR]',
                    sdate = '$time',
                    referer = '$_SERVER[HTTP_REFERER]',
                    browser = '$browser',
                    os = '$os'[i],
                    m_username = '$m_username'[/i]";


can these manipulations have caused that problem?
if not, did i discover a bug?

ty for your help!

Martin

martl

i had the very bright idea meanwhile to try out if deleting my database table extension and using the original .php-file will help, but no effect ...

i now restored my modifications in case some of you guys wanna have a look at the gallery.

martl

I forgot to add: i had reset all votes along with the update to 1.4.4 using the admin interface for the album.

i now removed the votes again, now on a "per picture" basis. After doing this, the tables "votes" and "vote_stats" still had entries, although the "best votes" website showed no pictures anymore. I suspect this was the reason, though i dont know why the tables weren't cleaned.
Apparently the average was calculated on all votes, but the displayed values were only the ones given after the upgrade (?)

I cleared the tables using PHPMyAdmin and enabled voting again now again.

We'll see what happens.

Martin

Nibbler

Moving this into bugs, seems the hit and vote stats are not reset along with the traditional hit and vote counters.

Joachim Müller

#4
they are probably not reset because the detailed stats have been added after the reset feature, so this was an omission.

Abbas Ali

Fixed in stable and devel branch. Please confirm.
Chief Geek at Ranium Systems

Joachim Müller

Works as advertized for me (checking with devel branch checkout). Thanks for fixing, marking thread accordingly.