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

Item11478: Statistics not generated for subwebs

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Closed Engine FoswikiUIStatistics  
Trying to update statistics on all webs does not appear to do subwebs. I'm not sure if this is because the subwebs are not readable by WikiGuest, but I have tried this from the command line, and also from the web as a member of AdminGroup.

-- JayenAshar - 28 Jan 2012

One-line, (one character) bug in Foswiki::UI::Statistics.
my $it   = $root->eachWeb(1);
The parameter (1) is missing - passing 1 causes eachWeb to retrieve subwebs. Otherwise it's a list of webs contained in the current level.

And - adding the 1 gets the 1st level subwebs, but it is not recursive, so the next level down is still omitted.

-- GeorgeClark - 30 Jan 2012

adding the 1 gets the 1st level subwebs, and it seems to be recursive, so the next level down is iterated.

-- JayenAshar - 30 Jan 2012

yes indeed. My subweb was missing it's WebPreferences. Since fixing this bug will change long-time behavior, I'll make the following changes:
  • Add -subwebs 0/1 parameter. Default false. If set, process subwebs.
  • Also add recursive processing for selected webs, so for example requesting bin/statistics/Sandbox/?subwebs=1 will process Sandbox and all subwebs below sandbox.

Fix is working. Need to update docs and unit tests (Apparently no unit tests).

-- GeorgeClark - 30 Jan 2012
Topic revision: r10 - 11 Apr 2012, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License