Details
-
Bug
-
Resolution: Fixed
-
High
-
3.3-m2
Description
The bootstrapPluginManager defined in the setupContext.xml file is still accessible from the plugins framework.
This causes a problem with classes in the plugins framework that require injection of com.atlassian.plugin.PluginAccessor as the ConfluencePluginManager also implements this interface.
This does not affect plugin autowiring as the bootstrapPluginManager is not exported as an OSGi service, only the plugins framework and possibly internal confluence classes that are autowired; however plugins using the default web-panel implementations will be broken.
The new web-panel feature of plugins 2.5 has two default implementations EmbeddedTemplateWebPanel and ResourceTemplateWebPanel which both depend on constructor injection of a PluginAccessor. This means that the ConfluenceHostContainer will throw an exception when attempting to autowire one of these -> the following module descriptors are currently broken in confluence:
<web-panel key="myPanel" location="atl.confluence.comments"> <resource name="view" type="static"><![CDATA[<b>Hello World!</b>]]></resource> </web-panel>
<web-panel key="myPanel" location="atl.bamboo.buildplan"> <resource name="view" type="velocity"><![CDATA[#set($name = 'foo')My name is $name]]></resource> </web-panel>
If your plugin implements it's own WebPanel and specifies it as below then it will work.
<web-panel key="myPanel" location="atl.crucible.dashboard" class="com.example.FooWebPanel">
We need to remove the bootstrapPluginManager from the spring context after it has finished being useful.