• 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.

Item7744: Preferences not read from template topics such as WebTopicViewTemplate

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine TWiki/UI.pm Normal New      

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


Preferences stored in WebTopicViewTemplate (as META::PREFERENCE or via 'Set') are not used when this topic is displayed for an inexistent topic.

The reason seems to be that TWIki::UI::readTemplateTopic() does not update the preferences cache. The following fix in lib/TWiki/UI.pm works for me:

sub readTemplateTopic {
...     my ($meta, $text) = $session->{store}->readTopic( $session->{user}, $web, $theTopicName, undef );
    $session->{prefs}->pushPreferences($web, $theTopicName, 'TOPIC');
    return ($meta, $text);

This function is only used in three places in the whole TWiki source code so the impact of this change should be well understandable.

-- TWiki:Main/StefanWalter - 2016-06-07

Summary Preferences not read from template topics such as WebTopicViewTemplate
ReportedBy TWiki:Main.StefanWalter
Codebase 6.0.2
SVN Range TWiki-6.0.2-trunk, Thu, 05 May 2016, build 30177
AppliesTo Engine
Component TWiki/UI.pm
Priority Normal
CurrentState New




Topic revision: r1 - 2016-06-07 - StefanWalter
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback