• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

All natskin web and site level preferences are disregarded for a logged in user. If the logged in user does not have any NatSkinPlugin preferences defined, which is the default, then the active styles used are those defined in the plugin itself -- no amount of fiddling with preferences will have an effect.

The correct behaviour would be to revert to the web & site preferences if the user prefs are not defined.

NatSkinPlugin ignores FINALPREFERENCES settings.

I cannot reproduce any of the behavior that you describe. The NatSkinPlugin does not use any out-of-band mechanisms to get preference values. It uses the common interfaces to plugins. From the code
 my $prefStyle = 
    TWiki::Func::getSessionValue('NATSKIN_SKINSTYLE') || # prefs set by style browser or urlparams
    TWiki::Func::getPreferencesValue('SKINSTYLE') || # user/web/site prefs
    $defaultStyle; # fallback to Clean style
Every preference value is fetched along this line. What's wrong with that? So if there is a bug here it is not related to the NatSkinPlugin.

Nevertheless, I tried to reproduce any error checking the following:

  1. diable all natskin prefs: fallback to hardcoded defaults
  2. enabled a different style in TWiki.TWikiPreferences: works as expected
  3. enabled a different style in Main.TWikiPreferences: works as expected
  4. enabled a different style in WebPreferences: overwrites site values
  5. enabled a different style in user's hometopic: overwrites site and web values
  6. set SKINSTYLE in Main.TWikiPreferences as final: user values are irgnored - works as expected

There might be confusion when a user defines the empty string as a value to a pref value: *   Set SKINSTYLE =. Then don't do that.

There might be confusion when you use the style browser and thereby define session preference values that are stored into the session object associated with your cookie. These have highest precedence. Use the Reset button in the style browser (or add the urlparam resetstyle=on to your http request) to delete those session preference values. Hm I have to check if session prefs take effect even though some of these are marked final...

... TRUE ... and the code above says it too (bah): setting a style using an urlparam style=FooBar will not be blocked by FINALPREFERENCES. That's because in general getPreferencesValue() does not consult the session values. Maybe that's an error. I will close this bug and reopen a new one. Maybe CDot is on IRC...


Reopening this bug. Indeed, there's a mixture of two bugs: one in TWiki.pm (See Item1105) and one in the initSkinState() of the NatSkinPlugin. IF Item1105 gets accepted I can check in the final fix to this bug by removing any explicite getSessionValue() that circumvents the normal preference handling


Fixed in SVN 7773.


Summary empty natskin user prefs override site and web prefs
ReportedBy MattWilkie

SVN Range 7686
AppliesTo Extension
Component NatSkinPlugin
Priority Urgent
CurrentState Closed

Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2005-12-05 - MichaelDaum
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback