Tags:
create new tag
, view all tags

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 | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2004-10-21 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.