Item8225: PublishPlugin does not manipulate contexts for the enabled plugins
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
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