Item12394: Warnings in logs when using subwebs and ContributorsPlugin
Priority: Normal
Current State: New
Released In: n/a
Target Release:
I am deploying
ContributorsPlugin on a semi-public Foswiki installation with subwebs.
I noticed that when the plugin tries to write the per-page contributors cache the following lines appear in the log:
FastCGI: server "/XXX/wiki/foswiki.fcgi" stderr: print() on closed filehandle TICK at /XXX/lib/Foswiki/Plugins/ContributorsPlugin.pm line 309.
I traced it to an incorrect filename generation in
sub makeCacheFilename
(
ContributorsPlugin.pm, line 298) where the filename is the contatenation of the web, topic, revision. The sub
does not check for slashes in the web name as is frequent with subwebs - thus tries to create a file in a folder that does not exist.
I suggest adding the following regular expression line 299:
$file=~s/\//_/;
--
JeanBaptisteMayer - 13 Feb 2013