Since I updated to counter module 6.x-2.16 about three weeks ago the "new visitor counter" stops counting new visitors . The site counter works fine. Does anybody has the same problem?

Comments

steeph’s picture

Yes, same problem here. I wasn't sure if it was an update or due to something else, because I migrated my site to a different server and updated some modules at the same time. Installing an older version of the Counter module doesn't help thou.

steeph’s picture

Title: counter 6.x-2.16 » Unique Visitors stopped counting

OK, after installing 2.14 and updating to 2.16 again two times it works for me. I don't know what went wrong the first and second time. Don't forget to run update.php.

Quillz’s picture

I've just installed counter 2.16 - no previous versions installed - and I am encountering this problem too.

drupalnesia’s picture

Status: Active » Postponed (maintainer needs more info)

Please try newer 6.x, e.g: 6.x-2.23 and report again if you still face this issue.

holydrupal’s picture

I have the same issue with 6.x-2.23.
and also the published nodes counter does not update when I add new node.
Have you encounter these issues?

andrey-sw’s picture

Sorry for my english.
The problem, in my view, is related to the code of counter.module line 120-132
is a corrected version for quick solutions

//counter_insert_delay
$db_types = $GLOBALS['db_type']; //substr($db_url,0, strpos($db_url,':'));
....
// $counter_lastdate = variable_get('counter_lastdate', date('Y-m-d H:i:s', time()));
$counter_lastdate = variable_get('counter_lastdate');
$interval = strtotime($counter_date) - strtotime($counter_lastdate);

......
$data_update = ($interval >= $counter_refresh_delay ? 1 : 0);
....
if ($data_update) {
variable_set('counter_lastdate', date('Y-m-d H:i:s', time()));
}

first time after installation of variable counter_lastdate not initialized, and $interval always zerro

drupalnesia’s picture

Category: bug » support

Using new installation of 6.x-2.23, I can not reproduce this bug.

@andrey-sw:
- the code should be
$counter_lastdate = variable_get('counter_lastdate', date('Y-m-d H:i:s', time()));
Drupal variable_get will get value from second argument if variable not yet set.

EvilGenius’s picture

I have the same issue, but with version 7.x-1.0-alpha7. alpha6 also had this issue...

drupalnesia’s picture

@EvilGenius:
by default Counter only refresh its value after 10 seconds (you can change this in Advanced Counter Settings). Try to wait 10 seconds then refresh, also try to clear the Drupal cache. Please report if the Unique Visitors still not counting. Thanks.

Teeman’s picture

I'm having the same problem with 7.x-1.0-alpha7, also tried alpha6 on the same site and had the same problem. Clearing the cache didn't change anything.

EvilGenius’s picture

Still not counting with 7.x-1.0-alpha7. Clearing cache, running cron, nothing works.

Hope you can help, do I need to open a new ticket?

drupalnesia’s picture

Version: 6.x-2.16 » 7.x-1.x-dev
Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (fixed)

7.x-1.0-alpha8: Bug fix: Wrong SQL command for PostgreSQL
7.x-1.0-beta1: New: Views integration
7.x-1.0-beta2: New: Save uid, nid, type, browser name, browser version, platform

Please open new ticket if still error,