Bug 6512 - Possible to delete plugin without disabling
Possible to delete plugin without disabling
Status: NEW
Product: OJS
Classification: Unclassified
Component: Plug-ins
2.4.x
All All
: P3 normal
Assigned To: PKP Support
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-17 11:33 PDT by James MacGregor
Modified: 2014-08-19 12:53 PDT (History)
3 users (show)

See Also:
Version Reported In:
Also Affects:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James MacGregor 2011-03-17 11:33:37 PDT
It is currently possible to delete a plugin without disabling it. Plugin settings also remain untouched in the database. I'd recommend requiring that a plugin has to be disabled before it can be deleted; but possibly leaving the  plugin_settings fields otherwise untouched in case the user wants to reinstall in the future. Or is this a bad idea?
Comment 1 Alec Smecher 2011-03-17 11:51:55 PDT
Is the current behavior causing problems? I kind of like the fact that settings stick around, but I'm not sure of the implications with lazy-load plugins or blocks.
Comment 2 James MacGregor 2011-03-17 11:56:16 PDT
(In reply to comment #1)
> Is the current behavior causing problems? I kind of like the fact that settings
> stick around, but I'm not sure of the implications with lazy-load plugins or
> blocks.

I'm not sure whether having the settings stick around might cause problems or not -- that was just an observed behaviour, and I honestly have no idea if it's a possible issue. However, I think allowing enabled plugins to be deleted without first disabling them isn't ideal. I'll definitely agree that this is small potatoes.
Comment 3 Bozana Bokan 2011-04-27 02:44:24 PDT
I've just deleted the Help Block Plug-In and noticed two strange things:

1. The plug-in is deleted for all journals -- Wouldn't it be better to only provide the option to disable a plug-in for journal managers? I am not sure if the journal managers are aware what does it mean to delete a plug-in from the server file system and I think that they actually shouldn't be able to decide it for other journals hosted on the same installation. For most of the plug-ins (except gateway and generic) they even don't have the possibility to disable but only to delete the plug-in. Maybe to allow the deletion only to the admin?

2. Deleting the plug-in didn't delete the entry in the database table 'versions' that leads to the error 'DB Error: Duplicate entry 'help-1-0-0-0' for key 1' and thus makes it impossible to install the plug-in again.
Comment 4 Bozana Bokan 2011-06-03 02:25:35 PDT
Hello,

Deleting the plug-in (in 2.3.5) doesn't delete the entry in the database table 'versions' that leads to the error 'DB Error: Duplicate entry '...'
for key 1' and thus makes it impossible to install the plug-in again.

Is this a bug?

Thanks!
Comment 5 Alec Smecher 2011-06-03 07:50:56 PDT
Yes, that's definitely a bug. The plugin installer shouldn't presume that there are no settings already in place.