Foswiki on GitHub is open for business! Next release meeting: Monday September 15, 1300Z

Item9675: statistics script doesn't process all webs by default

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Urgent Closed Engine statistics  
The statistics script is supposed to process all "user webs" by default.

On 1.1, it only processes the Main web, which is the "Users" web, but not a user (as opposed to system) web.

Foswiki 1.0.10 Foswiki 1.1
 ./statistics -user AdminUser
Foswiki: Create Usage Statistics
!Do not interrupt this script!
(Please wait until page download has finished)
* Statistics for Sep 2010
* Reporting on Main web
  - view: 20, save: 6, upload: 0
  - top view:  11 BlabBlabVee
  - top contributor:   6 Main.AdminUser
  - Topic WebStatistics updated
* Reporting on Sandbox web
  - view: 2, save: 0, upload: 0
  - Topic WebStatistics updated
* Reporting on System web
  - view: 3, save: 1, upload: 0
  - top view:   2 WebHome
  - top contributor:   1 Main.AdminUser
  - Topic WebStatistics updated
* Reporting on TWiki web
  - view: 0, save: 0, upload: 0
  - Topic WebStatistics updated
* Reporting on TestCases web
  - view: 0, save: 0, upload: 0
  - Topic WebStatistics updated
* Reporting on Trash web
  - view: 0, save: 0, upload: 0
  - Topic WebStatistics updated
End creating usage statistics
./statistics -user AdminUser
Foswiki: Create Usage Statistics
!Do not interrupt this script!
(Please wait until page download has finished)
* Statistics for Sep 2010
* Reporting on Main web
  - view: 9, save: 0, upload: 0
  - top view:   7 WebStatistics
  - Topic WebStatistics updated
End creating usage statistics

Note also that the "-user AdminUser" parameter is apparently ignored on 1.1. The Statistics topic is updated by WikiGuest.

Debugging this a bit more.

Foswiki 1.0.10 - the script runs by default as "AdminGroup" as shown by a debug print in UI/Statistics.pm. If the "-user" parameter is specified, it is honored.
 ./statistics 
SESSION USER IS AdminGroup 
Foswiki: Create Usage Statistics
./statistics -user JoeUser
SESSION USER IS JoeUser 
Foswiki: Create Usage Statistics

Foswiki 1.1 always runs as BaseUserMapping_666 regardless of the CLI parameter
./statistics  -user AdminUser
Processing user = AdminUser   (Debug print in Engine::run()   Parameter is picked up.)
SESSION USER IS BaseUserMapping_666 

-- GeorgeClark - 15 Sep 2010

The "wrong user" has been fixed on Trunk only for now.

The problem with processing only the Main web - we seem to do a better job of defaulting the web, and the script is unable to determine that it was called with a missing web. I'm not sure yet how to fix that. If I remove the test for either WebName or requestedWebName, then it generates all webs, even when runs in a web context from the CGI. for example: statistics/Sandbox Otherwise webName and requestedWebName appear to be always set.

-- GeorgeClark - 16 Sep 2010

Reopened to correct the regex for "param=value" syntax (no hyphen escape). Script now accepts:
  • statistics -webs Main
  • statistics -webs=Main
  • statistics webs=Main

-- GeorgeClark - 20 Sep 2010
 

ItemTemplate edit

Summary statistics script doesn't process all webs by default
ReportedBy GeorgeClark
Codebase 1.1.0 beta1, trunk
SVN Range
AppliesTo Engine
Component statistics
Priority Urgent
CurrentState Closed
WaitingFor
Checkins Foswikirev:9148 Foswikirev:9169 Foswikirev:9172 Foswikirev:9173 Foswikirev:9174 Foswikirev:9175 Foswikirev:9265 Foswikirev:9266
TargetRelease minor
ReleasedIn 1.1.0
Topic revision: r12 - 04 Oct 2010, KennethLavrsen
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License