Counter stoped working when photos are viewed externally Counter stoped working when photos are viewed externally
 

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

Counter stoped working when photos are viewed externally

Started by op, March 17, 2007, 07:39:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

op

My installed 1.4.8 version (http://www.matisseth.be/cpg/index.php?lang=english_gb) was working perfectly until on a given day the view counter only worked if a photo was viewed from my PC. When friends acces individual photos, the counter is not incremented it seems.

The "cpg148_hit_stats" table in the database contains 1893 hits from diverse IP-adresses, but the counter displayed under individual photos remains zero when photos are viewed from a different PC than my own. The "hits" field in the "cpg148_pictures" table is however not updating.

Is there a way to update the "hits" field in the "cpg148_pictures" table with the contend in "cpg148_hit_stats"?

Why is the view counter not working when photos are viewed externally?

I recently upgraded to version 1.4.10, but the problem percists. This is not a "logged in as admin" counter problem.


Joachim Müller


op

Might be that the server was hanging for a moment. The URL I posted is correct and working.

http://www.matisseth.be/cpg/index.php

Thanks

Joachim Müller

Counter works for me as expected. http://www.matisseth.be/cpg/displayimage.php?pos=-643 used to have one hits before I visited. I went to that page, now it has a counter value of "2". Note that a hit is only counted once. Revisiting the page doesn't increment the counter any more. So probably your friend had already visited the particular image that you tested with. For further testing, clear your cookies.

op

Thanks for the fast answer! I was not aware of the effect of cookies on revisits.

But is there a way to update the "hits" field in the "cpg148_pictures"-table of the cpg-database with the contend in "cpg148_hit_stats"-table?
I did a "reset counter" action a while back in an attempt to solve the problem before upgrading to 1.4.10

Joachim Müller

Resetting the cookie doesn't have an impact on the content of the stat_details table. The stat_details mod has been a last-minute contribution to the core closely before the release of cpg1.4.x, so it isn't fully functional yet, in terms of discrepancies between the hits counter and the stat_details feature.
This is being reviewed for cpg1.5.x; for cpg1.4.x, you'll have to live with what is there.