Item8225: PublishPlugin does not manipulate contexts for the enabled plugins

pencil
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: PublishPlugin
Branches:
Reported By: Foswiki:Main.MichaelTempest
Waiting For:
Last Change By: CrawfordCurrie
PublishPlugin does not set or clear the contexts that indicate which plugins are enabled.

For example, if a topic contains the following:
   * Set DISABLEDPLUGINS=InterwikiPlugin
The !InterwikiPlugin is %IF{"context InterwikiPluginEnabled" then="en" else="dis"}%abled

Wiki<nop>:InterWiki points to Wiki:InterWiki

...then it renders as ...
The InterwikiPlugin is disabled

Wiki:InterWiki points to Wiki:InterWiki
... as expected - but it publishes (incorrectly) as ...
The InterwikiPlugin is enabled

Wiki:InterWiki points to Wiki:InterWiki


Foswiki::Plugins::PublishPlugin::Publisher::publishTopic() has two ways of generating the correct environment for rendering the topic, depending on whether &Foswiki::Func::pushTopicContext is defined. If that function is not defined, then publishTopic() creates a new Foswiki session. That approach is slow, but it works. (This bug does not manifest if I comment out the push/popTopicContext-related code.)

-- MichaelTempest - 02 Aug 2009

As Crawford said on IRC, creating a new Foswiki session for every topic is wrong. Quite a number of changes are needed, in the right order, in order for all of this to work correctly.

-- MichaelTempest - 03 Aug 2009

I think I made this more complex than it needs to be....

-- CrawfordCurrie - 24 Mar 2011

 

ItemTemplate edit

Summary PublishPlugin does not manipulate contexts for the enabled plugins
ReportedBy Foswiki:Main.MichaelTempest
Codebase
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Extension
Component PublishPlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins BookmakerPlugin:325ed5cbaf5d PublishPlugin:b2a19b0a5ede
TargetRelease n/a
ReleasedIn n/a
Topic revision: r6 - 28 Mar 2011, CrawfordCurrie - This page was cached on 25 Apr 2017 - 12:48.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License