Item11478: Statistics not generated for subwebs

Priority: Normal
Current State: Closed
Released In: 1.1.5
Target Release: patch
Applies To: Engine
Component: FoswikiUIStatistics
Branches: Release01x01 trunk
Reported By: JayenAshar
Waiting For:
Last Change By: GeorgeClark
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 - This page was cached on 22 Sep 2017 - 01:56.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License