Item12840: Debug option doesn't print the prefs
Priority: Normal
Current State: Confirmed
Released In: n/a
Target Release:
When turning on debug mode in
LoginNameAliasesPlugin, the debug log only ever records an empty list of preferences. e.g. it reads
2014-04-01T20:45:30Z debug |
- LoginNameAliasesPlugin prefs read. user: guest |
2014-04-01T20:45:30Z debug |
- LoginNameAliasesPlugin prefs: |
2014-04-01T20:45:30Z debug |
- logFile: /var/lib/foswiki/working/LoginNameAliasesPlugin_logfile.txt |
Note the distinct lack of preferences print out after
LoginNameAliasesPlugin prefs:.
The fix is to replace
%prefs
on line 260 of
LoginNameAliasesPlugin.pm with
%{$Foswiki::cfg{LoginNameAliasesPlugin}}
. The foreach loop should now read
foreach my $p ( keys %{$Foswiki::cfg{LoginNameAliasesPlugin}} ) {
Foswiki::Func::writeDebug(
"- $pluginName pref $p is $Foswiki::cfg{LoginNameAliasesPlugin}{$p}"
);
}
After this change, the output in the debug log now looks like this:
which is a much better result.
--
LloydParkes - 02 Apr 2014
Thanks for the patch. This extension doesn't have a current maintainer. Feel free to fork and apply the patch at
Github:foswiki/LoginNameAliasesPlugin
--
GeorgeClark - 24 Dec 2014