Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#15709 closed defect (bug) (fixed)

Plugin deletion when running multisite

Reported by: flashingcursor's profile flashingcursor Owned by: petemall's profile 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)

plugin-deletion.png (70.3 KB) - added by PeteMall 14 years ago.
15709.diff (1.7 KB) - added by PeteMall 14 years ago.
15709.2.diff (2.6 KB) - added by PeteMall 14 years ago.
15709.3.diff (3.4 KB) - added by PeteMall 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.
15709.4.diff (3.3 KB) - added by PeteMall 14 years ago.
Updated error string

Download all attachments as: .zip

Change History (18)

#1 @PeteMall
14 years ago

There is a pending patch for this on another ticket. I'll be addressing these issues later today.

#2 @nacin
14 years ago

  • Milestone changed from Awaiting Review to 3.1

#3 @ocean90
14 years ago

PeteMall: Something new?

#4 @PeteMall
14 years ago

  • Owner set to PeteMall
  • Status changed from new to accepted

@PeteMall
14 years ago

#5 @PeteMall
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.

@PeteMall
14 years ago

#6 @PeteMall
14 years ago

rboren: validate_active_plugins() should have some new args rather than doing is_network_admin() and is_super_admin() checks

Last edited 14 years ago by PeteMall (previous) (diff)

#7 @nacin
14 years ago

How to fix this:

  1. Hide the delete link if the plugin is active on the main site.
  1. 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.

@PeteMall
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.

@PeteMall
14 years ago

Updated error string

#8 @PeteMall
14 years ago

  • Keywords has-patch added

#9 @nacin
14 years ago

  • Keywords i18n-change added

#10 @ryan
14 years ago

(In [17033]) Remove the delete action link from the network admin if the plugin is active on the main site. Remove the plugin(s) from the deletion list for the bulk actions and shows an error if no other plugin was selected for bulk-deletion. Props PeteMall. see #15709

#11 @ryan
14 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

#12 @nacin
14 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Need to warn super admins on the plugin deletion screen that the plugin may be activated elsewhere. Only if ! is_network_only plugin.

Handling.

#13 @nacin
14 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [17036]) Network Admin: Show a warning when deleting non-network-only plugins, as they may be activated on subsites. fixes #15709.

Note: See TracTickets for help on using tickets.