no-go
Closed this issue · 8 comments
First of all: thank you for taking on the task of bringing jawstats back to life!
seems like I have the same issue as the old 0.7 release though.
Only top-bar showing with no data rendering below.
Last updated Tuesday, 30th November 1999 at 00:00 (5215 days ago) A total of 0 visits (0 unique) this month, an average of 0.0 per day (0.0 unique).
Same script error as original 0.7:
Uncaught ReferenceError: dtMaxDate is not defined
Im guessing this is the first error occurring because of lacking data.
trying the "hours" tab gives me:
Uncaught TypeError: Cannot read property 'aData' of null
Data is there, awstats generating html files ok.
Interestingly, this error is erratic for me; some months work but others don't. I suspect it might be some sort of parsing error of the AWStats data...
Looks like the problem in my case was due to the GEOIP plugin returning wonky-encoded strings. AS11315 in particular
Location names as well as network blocks both contain wonky encodings, and AWStats is okay with them but JAWStats is barfing.
Aha! I have a geoip plugin installed to. Forgot about that, I just assumed the data was ok since the static html files where being generated.
I'l try and rebuild some data without geo-info.
Thanks for the info speachy!
Hi, I don't even had a time to get close to that issue. It's nice that you can investigate it by yourselves. If there is anything wrong in the code base I'm ready for a PR.
in clsAWStats.php:73
removing the htmlspecialchars function
$this->sAWStats = file_get_contents($sFilePath);
seems to make it work for me with geoIP cities and countries being reported.
I have no idea what kind of side effects this might give us though 😄
I guess the htmlspecialchars function fail because of those wierdo encodings produced by geo-plugin, multiple encodings in one string is probs not supported. Are there even "special" html characters present in the awstas data?
The root cause here is that the geoip plugin generates bad/inconsistent html-encoded data, and yes, it's present in the AWStats data files.
replace:
-
with:
$this->sAWStats = htmlspecialchars(file_get_contents($sFilePath));
-
$this->sAWStats = htmlentities(file_get_contents($sFilePath), ENT_IGNORE);
And that seems to work for me.
+1
line 54 change to $this->sAWStats = htmlentities(file_get_contents($sFilePath), ENT_IGNORE);