Question
Hello,
I encountered a problem regarding the webstatistics topic.
Although the log-Files exist and do contain the correct information, topic views do not get updated in webstatistics topic. (Whereas topic saves do)
In Twiki.cfg
doLogTopicView is set to 1. When I set
doDebugStatistics to 1, debug.txt contains many entries of the form:
07 Jan 2005 - 10:42 Invalid log file line = '| 07 Jan 2005 - 08:39 | Berlin.Gast | view | Berlin.WebHome | | 213.69.239.40 |'
07 Jan 2005 - 10:42 userName = ''
07 Jan 2005 - 10:42 opName = ''
07 Jan 2005 - 10:42 webName = ''
This problem occurs regardless of the method I employ to generate the statistics (via cron job or manually or by executing the statistics script in the shell).
I do not know whether this has anything to do with the problem, but testenv shows one strange problem:
User: twiki
Note: Your CGI scripts are executing as this user.
Warning: Since your CGI script is not running as user nobody, you need to change the locks in the *,v RCS files
of the TWiki distribution from nobody to twiki. Otherwise, changes to topics will not be logged by RCS.
Fix: If needed, relock all the rcs files to user twiki
Though I already executed the fix and all files are most likely correctly locked, this message remains on the testenv screen.
(see attached testenv.htm)
Do you have any ideas what to do about that?
Environment
- testenv.htm: The output generated by testenv (anonymized)
--
JanHegewald - 07 Jan 2005
Answer
Not sure what's going on here - you will probably need to do your own
TWikiDebugging... The statistics script should be able to handle non-WikiWord topic names OK, but the invalid format error messages are a concern - have a look in the code for
SVNget:lib/TWiki/UI/Statistics.pm
where it prints the message, and maybe print the regexes imported from $TWiki::... to check they are set to something.
You may find that
use re 'debug'; is useful to provide debugging info on the regexes.
--
RichardDonkin - 07 Jan 2005
When I tried to print out
$1,
$2 and
$3, respectively
$userName,
$opName and
$webName, I discovered that they were all empty in
_collectLogData in
Statistics.pm, line 253.
When debugging the regexes, I get
webNameRegex: (?-xism:[[:upper:]]+[[:alpha:][:digit:]]*)
userRegex: (?-xism:(?:(?-xism:[a-z0-9]+)|(?-xism:[[:upper:]]+[[:lower:]]+[[:upper:]]+[[:alpha:][:digit:]]*)))
opRegex: (?-xism:[a-z0-9]+)
Looks alright, doesn't it?
--
JanHegewald - 14 Jan 2005
Is it possible that Twiki has a problem with the user name since it contains only one uppercase letter?
--
JanHegewald - 14 Jan 2005
Well - I found the problem. It really was the user name. I changed
$defaultUserName in
TWiki.cfg from "guest" to "Gast" (German for guest).
Obviously the former produced user entries like
Main.TWikiGuest (according to the sample lines in
Statistics.pm) whereas the latter simply produced an entry like
Main.Gast which misses a second uppercase letter.
So setting
$defaultUserName to "TWikiGast" solved the problem.
--
JanHegewald - 14 Jan 2005
Thanks for reporting how you solved this - glad it's working!
--
RichardDonkin - 14 Jan 2005
Similar problem on 4.0.2 on
this topic
--
HolgerBille - 27 Apr 2006