Bug: getPluginPreferencesFlag can not get the correct setting of DEBUG flag in my plugin
$debug = getPluginPreferencesFlag( "DEBUG" ) can not get the correct setting of DEBUG flag in my plugin.
Test case
I have copied the
EmptyPlugin for my new own plugin which is called
PhotoarchivePlugin. If I use the $debug = ...::getPluginPreferencesFlag( "DEBUG" ) like the example, $debug never becomes 1 although DEBUG is set to 1 in the Plugin preferences.
In
DefaultPlugin it works.
For now I've changed to getPluginPreferencesValue( "DEBUG" ) and it works for me.
Environment
--
MarkusKolb - 20 Sep 2004
Follow up
I forgot to add the link to my support question:
GetPluginPreferencesFlagDoesNotWork
--
MarkusKolb - 20 Sep 2004
I have the same problem. Looking into
SessionPlugin.pm, I found this:
$debug = TWiki::Func::getPreferencesFlag( "\U$pluginName\E_DEBUG" );
This works. I don't know why. I use Perl5.8.4/Apache2.0.52/mod_perl1.99_16 on
WinXP.
--
KaoruMaeda - 15 Oct 2004
It works because you are user
getPreferencesFlag and not
getPluginPreferencesFlag. The bug is against
getPluginPreferencesFlag.
--
CrawfordCurrie - 15 Oct 2004
Ah, OK, I should've read
GetPluginPreferencesFlagDoesNotWork first. Never mind.
--
KaoruMaeda - 15 Oct 2004
Fix record