Item12674: PlainFile logger fails when {Site}{CharSet} is not set
Priority: Urgent
Current State: Closed
Released In: n/a
Target Release: n/a
Line 116 of Logger/PlainFile.pm - requires {Site}{CharSet} to be non-empty. The default for a new config is empty.
--
CrawfordCurrie - 03 Dec 2013
The checker:
Foswiki::Configure::Checkers::Site::CharSet
defaults it so it should always be defined. We can jigger the logger, but are there other dependencies that assume a charset?
--
GeorgeClark - 03 Dec 2013
Checkers check; they should
not be relied on to set. For one thing, there are no guarantees as to the evaluation order of checkers. If a checker sets a default, it's a bad hack - defaults come from Foswiki.spec (or in the worst case from Pluggables, though I want to reduce their prominence.)
I'm not aware of any other dependencies - I couldn't get beyond this one. There are certainly none in standard core, because it has a backup (site charset defaults to iso-8859-1)
I just found another dependency - one of the logger checkers assumes a query is set, which obviously prevents it being used in a non-CGI environment.
--
CrawfordCurrie - 04 Dec 2013
Well, that checker for
Site::CharSet
was added back in
distro:cd9c3f9d9014, by some guy,
CrawfordCurrie.
--
GeorgeClark - 04 Dec 2013
Hey, I never claimed to be perfect
I'm just saying that what I did was wrong. That sort of hack needs removing.
--
CrawfordCurrie - 05 Dec 2013