[#6708] "Currently online visitors" is not populated after upgrade
History
Comments
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.
Date: 2011-10-07 04:19
Posted By: Peter Tindemans (realrock)
Any developments on this bug? or is there any work around?
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.
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';
}
}