Opened 14 years ago
Closed 14 years ago
#15709 closed defect (bug) (fixed)
Plugin deletion when running multisite
Reported by: | flashingcursor | Owned by: | PeteMall |
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | normal | Version: | 3.1 |
Component: | Network Admin | Keywords: | has-patch i18n-change |
Focuses: | multisite | Cc: |
Description
When you try to delete a plugin at the network admin level and that plugin is active on a site, it seems to fail deletion without warning.
Network deactivate doesn't work properly, nor is it an option unless you've network activated it first. Since plugins can be active at the site level and not network activated, the only way to delete a plugin is to find the site that has it activated, deactivate it, then delete it.
This should probably act the same way for themes and plugins:
Network admin: Delete indiscriminately with warning
Network admin: Enable / Disable network wide
Site admin: No delete option when network is enabled
Site admin: activate / deactivate if have cap
Still a lot of loose ends with network admin of plugins and themes...
Attachments (5)
Change History (18)
#5
@
14 years ago
validate_active_plugins()
should only validate network activated plugins in the network admin. This will avoid the error message displayed in the network admin for a deleted plugin that was activated on the main site.
#6
@
14 years ago
rboren: validate_active_plugins() should have some new args rather than doing is_network_admin() and is_super_admin() checks
#7
@
14 years ago
How to fix this:
- Hide the delete link if the plugin is active on the main site.
- On the plugin deletion confirmation screen,
if is_network_admin() && ! is_network_only_plugin()
, include a div class="error" with a warning similar to the JS confirmation dialog on #15707.
@
14 years ago
New patch removes the delete action link from the network admin if the plugin is active on the main site. It also removes the plugin(s) from the deletion list for the bulk actions and shows an error if no other plugin was selected for bulk-deletion.
There is a pending patch for this on another ticket. I'll be addressing these issues later today.