r6 - 21 Oct 2004 - 07:00:34 - PeterThoenyYou are here: TWiki >  Codev Web > GetPluginPreferencesFlagDoesNotWorkInMyPlugin
Tags:
, create new tag

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

TWiki version: TWikiRelease01Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Linux 2.6.x
Web server: Apache 2.0.49 backported
Perl version: 5.8.x
Client OS: Windows XP
Web Browser: Mozilla

-- 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. stick out tongue

-- KaoruMaeda - 15 Oct 2004

Fix record

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r6 < r5 < r4 < r3 < r2 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback SourceForge.net Logo