Advanced search  

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

Pages: [1]   Go Down

Author Topic: voting is broken?  (Read 7181 times)

0 Members and 1 Guest are viewing this topic.

martl

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
voting is broken?
« on: March 12, 2006, 11:30:59 pm »

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"

Code: [Select]
[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
« Last Edit: May 18, 2006, 09:11:37 pm by GauGau »
Logged

martl

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: voting is broken?
« Reply #1 on: March 13, 2006, 12:12:25 am »

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.
Logged

martl

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: voting is broken?
« Reply #2 on: March 14, 2006, 05:11:53 pm »

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
Logged

Nibbler

  • Guest
Re: voting is broken?
« Reply #3 on: March 15, 2006, 06:11:51 pm »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: voting is broken?
« Reply #4 on: May 18, 2006, 07:47:14 am »

they are probably not reset because the detailed stats have been added after the reset feature, so this was an omission.
« Last Edit: May 18, 2006, 08:58:56 pm by GauGau »
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: voting is broken?
« Reply #5 on: May 18, 2006, 10:14:46 am »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: voting is broken?
« Reply #6 on: May 18, 2006, 09:11:22 pm »

Works as advertized for me (checking with devel branch checkout). Thanks for fixing, marking thread accordingly.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 18 queries.