CMS MADE SIMPLE FORGE

Statistics

 

[#6708] "Currently online visitors" is not populated after upgrade

avatar
Created By: Reidar Falch (ReidarF)
Date Submitted: Thu Jul 28 04:12:36 -0400 2011

Assigned To:
Version: 1.1.3
CMSMS Version: None
Severity: Major
Resolution: None
State: Open
Summary:
"Currently online visitors" is not populated after upgrade
Detailed Description:
After upgrading from 0.9.2 to 1.1.3, "Currently online visitors" is not
populated. Otherwise it seems to count.


History

Comments
avatar
Date: 2011-08-07 11:36
Posted By: Peter Tindemans (realrock)

Same here, no currently online visitors statics anymore afther the update.

The strange thing is that it shows one current visitor an that is me, visiting
the 404 page.
      
avatar
Date: 2011-10-07 04:19
Posted By: Peter Tindemans (realrock)

Any developments on this bug? or is there any work around?
      
avatar
Date: 2011-10-31 12:24
Posted By: Jelle F (jellef)

I see the same problems. Visitor statistics have stopped updating. The last
working release seems to be 1.1.10! Please fix this.
      
avatar
Date: 2012-02-29 20:55
Posted By: Jan Bakke (janb)

There is a column missing in (prefic)_module_stat_visitors "referer"
Either add this to MySQL manually, should be varchar(255) or fix this in
modules/Statistics/method.upgrade.php.
There should be some lines taking care of upgrades from 1.1.2
One other solution (until next upgrade/fix) is to make an UDT like below and
name it for example statistics_referer_fix. Then put the UDT on a content page
and access it once.

$gCms = cmsms();
$statistics =& cms_utils::get_module ('Statistics');
$db = cmsms()->GetDb();
$dict = NewDataDictionary($db);

$current_version = $statistics->GetVersion();

switch ($current_version) {

  case "1.1.2" : {
$sqlarray = $dict->AddColumnSQL(cms_db_prefix()."module_stat_visitors",
"referer C(255)");
    $dict->ExecuteSQLArray($sqlarray);
    echo 'Applied Fix to Statistics version 1.1.2';
  }

  case "1.1.3" : {
$sqlarray = $dict->AddColumnSQL(cms_db_prefix()."module_stat_visitors",
"referer C(255)");
    $dict->ExecuteSQLArray($sqlarray);
    echo 'Applied Fix to Statistics version 1.1.3';
  }

  case "1.2.0" : {
$sqlarray = $dict->AddColumnSQL(cms_db_prefix()."module_stat_visitors",
"referer C(255)");
    $dict->ExecuteSQLArray($sqlarray);
    echo 'Applied Fix to Statistics version 1.2.0';
  }
}