Edgewall Software
Modify

Opened 18 years ago

Closed 16 years ago

#3545 closed defect (fixed)

WebAdmin : error when trying to uninstall a disabled plugin

Reported by: anonymous Owned by: osimons
Priority: low Milestone: 0.11.2
Component: admin/web Version: 0.9.6
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I had installed a pluging in the local plugins directory. Then I unchecked the box Enabled, trying to disable it. It didn't disable it because it was localy installed. However, a disabled line was written in the trac.ini file.

Then when I tried to uninstall the plugin, WebAdmin came back to me with an error saying it could not find the plugin which was just uninstalled. The plugin file was removed correctly, but the disabled line in the trac.ini file was still there.

Attachments (1)

t3545-remove_plugin_uninstall-r7529.diff (906 bytes ) - added by osimons 16 years ago.
Commenting out the 'Uninstall' div.

Download all attachments as: .zip

Change History (8)

comment:1 by Christian Boos, 18 years ago

Milestone: 1.0
Priority: normallow

Worth to be verified.

comment:2 by xurizaemon, 17 years ago

I can confirm this issue affected us too. However, it may just be an issue with the intuitive process of uninstalling plugins.

Our plugin was installed in the local plugins directory, and appeared in trac.ini as well.

I commented out the pluginname.* = enabled lines in trac.ini, but this didn't affect the plugin appearing in Trac.

So I used WebAdmin to uncheck all of the plugin entries. This didn't affect the plugin appearing either. (NB. WebAdmin's "uninstall" button was disabled, presumably because the plugin was locally installed to this project? Might help if this was explicitly documented.)

So I moved the plugin out of the local directory. This threw an error because the plugin was now referenced once more in trac.ini (as disabled, by WebAdmin).

The correct deinstallation procedure (which worked for me) was: uncomment references in trac.ini, remove .egg file from plugins dir, restart Apache.

comment:3 by xurizaemon, 17 years ago

Addendum to previous report: Trac 0.10.3-1etch2, TracWebAdmin 0.1.2dev-r4429

comment:4 by osimons, 17 years ago

Milestone: 1.00.11.1

Following #3833, the plugin loading and enable/disable has been much improved for 0.11. The handling of the trac.ini settings should not be an issue with latest version. If disabled in Admin, the plugin will no longer be visible or otherwise be in use.

However, the main issue here is that Trac can't effectively unload a module (plugin) that is already loaded in memory. It needs a restart without the plugin being available for that to happen. And, as we should not really move, remove or delete code files that are in use, I'm not sure what the best option is - a bit of a catch-22 actually.

Also, with a multi-project setup that plugin loaded from one project will show up in other projects and may well be enabled and in use elsewhere.

The simple workaround for this is to remove the 'Uninstall' button as it cannot be used in a practical manner. That is at least a quick fix for the current situation.

comment:5 by osimons, 16 years ago

Owner: changed from Christopher Lenz to osimons

Moving this onto my to-do.

by osimons, 16 years ago

Commenting out the 'Uninstall' div.

comment:6 by osimons, 16 years ago

Milestone: 0.11.30.11.2

Above patch just comments out the 'Uninstall' button/div so that it does not display. At least a quick fix to remove the illusion that a plugin can be uninstalled reliably once it has been loaded…

Patch should be good for next 0.11.2, I hope?

As for the longer term future of plugin uninstall, I'm quite uncertain as I don't see any way to reliably provide a web-interface to remove loaded plugins. If no-one else has a good idea for how this can be done, we should likely also permanently remove all the template + python code that relates to this feature.

comment:7 by osimons, 16 years ago

Resolution: fixed
Status: newclosed

Patch committed in [7599], and uninstalling plugins through webadmin is no longer possible. See TracPlugins#Uninstalling for how to uninstall plugins.

Closing the ticket against 0.11.2, but leaving a FIXME: in the template comment for future reference - with hopes of reviving the feature at some stage if a good solution is found.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain osimons.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from osimons to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.