powered by Jive Software

Plugin dependency problem

I run into a problem when making one plugin dependant on another (using the element in plugin.xml). To illustrate the problem, I’'ve created two dummy plugins (parentplugin and childplugin) where childplugin depends on parentplugin.

To reproduce the problem, you start the Wildfire server without loading the plugins. After the server started, copy parentplugin.jar to /wildfire/plugins/. After a while, a link to the parentplugin admin page will appear in the webadmin console. This pages url is http://localhost:9090/plugins/parentplugin/parent-props-edit-form.jsp

So far, so good.

Now, load the Child Plugin by copying childplugin.jar to /wildfire/plugins/. After some time, the link to the adminpage of the parentplugin seems to be replaced by a link to the adminpage of the childplugin. However, when you click on the link, you’‘ll get a blank screen. The URL you’‘ve been loading turns out to be http://localhost:9090/plugins/parentplugin/child-props-edit-form.jsp - note the difference in page and directory: you get referred to the parentplugin’'s directory, but the child-plugins page is being presented.

Two strange things:

  • the parentplugin admin page disappears;

  • the childplugin admin pages URL is incorrect.

I got this error in a Wildfire 3.0.0 setup, but it seems to exist in 2.6.0 as well. I’‘ve written the child and parentplugins again from scratch (well, they’‘re as good as empty) - so either something is buggy in the webadmin interface or I’'ve been repeating my mistake.

If I knew how to add files to these posts, I’'d have included the plugins. If you want them, just leave me a message.

Message was edited by: Guus

As far as I can tell, the plugin functionality isn’‘t being affected. The main problem is that you can’‘t access the webpages of the admin interface normally (manipulating the URL yourself works, but you’‘ll loose the top and side bar if you load the parent plugin). It’'s a bit harder to configure your plugins because of this.

Whenever you load a third plugin (a second childplugin), the reference to the first childplugin is dropped from the admin page as well. It is overridden by a link to the second childplugin. That link is equally false though.

Guus,

You now have permission to create attachments.

Regards,

Matt

Ok, I’'ve added a zip containing two plugins, as basic as I could get them.
plugins.zip (4268 Bytes)

I’‘ve tracked down the cause of the bug. It’'s three lines in PluginManager (lines 409-411 in todays SVN):

if (parentPluginNode != null) {
    pluginName = parentPluginNode.getTextTrim();
}

If removed, the bug disappears! I’‘m not sure what the intention of these lines were in the first place, so I might have knocked something else down. I’'ve not noticed anything though.

Shameless bump. This problem still persists in 3.2.2. I’'d like this issue to be captured in a Jira issue, if possible.

Hey Guus,

Thanks for catching that one. I filed JM-1031 and applied your fix.

Thanks,

– Gato