Make WordPress Core

Opened 5 years ago

Last modified 2 months ago

#38112 assigned defect (bug)

Deleting an Active Plugin via Bulk Actions Fails Silently

Reported by: mrwweb Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Plugins Keywords: needs-testing shiny-updates has-patch
Focuses: Cc:


With the introduction of shinier updates in 4.6, it appears that the error messaging around deleting an activated plugin wasn't ported into the new system properly.

To reproduce:

  1. On Plugins Screen, select an activated plugin.
  2. From "Bulk Actions" select "Delete"
  3. Click Apply


Nothing happens. Silent failure (to delete).

Expected Result:

Error message explaining that you can't delete activated plugins.

In one case, I actually saw the expected error message after refreshing the plugins page, but I haven't been able to replicate that since.

Attachments (2)

38112.diff (3.4 KB) - added by swissspidy 5 years ago.
38112.2.diff (4.0 KB) - added by swissspidy 5 years ago.

Download all attachments as: .zip

Change History (14)

#1 @swissspidy
5 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 4.7

Thanks for your report. I can confirm the issue.

5 years ago

#2 @swissspidy
5 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

This really must have slipped under the radar somehow. There was no JS template for bulk deletions or anything. Luckily, it is easy to fix.

38112.diff addresses the issue. @mrwweb Can you test this on your site to see if it works for you as well?

#3 @swissspidy
5 years ago

Here's a screenshot after attempting to delete an inactive and an active plugin:


Now I've alse tested on multisite where it doesn't work at all :(

Theme deletion error message is undefined but the theme is deleted anyway after the second attempt:


Plugin deletion error messages work, but somehow there's also an inline error message:


#4 @swissspidy
5 years ago

  • Keywords shiny-updates added
  • Owner set to swissspidy
  • Status changed from new to assigned

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.

5 years ago

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.

5 years ago

5 years ago

#7 @swissspidy
5 years ago

  • Keywords needs-patch added; has-patch removed
  • Milestone changed from 4.7 to Future Release

I couldn't reproduce the undefined bug and I don't know why deleting a network enabled theme is even possible.

38112.2.diff changes the selector in wp.updates.deletePluginError to show the bulk admin notice and the inline notice. This makes the bug at least more obvious for both screens during testing.
Unfortunately, I haven't found a good solution yet to hide inline admin notices during a bulk action. The bulk handler would need to pass custom success & error callbacks instead of hooking into the triggers inside wp.updates.deletePluginError() et al. Ideally, the inline notices should not be added in wp.updates.deletePluginError() directly, but also via the hook.

This ticket was mentioned in Slack in #feature-shinyupdates by swissspidy. View the logs.

5 years ago

#9 @desrosj
3 years ago

  • Keywords has-patch added; needs-patch removed

#10 @SergeyBiryukov
2 years ago

#47337 was marked as a duplicate.

#11 @SergeyBiryukov
19 months ago

#49887 was marked as a duplicate.

#12 @swissspidy
2 months ago

  • Owner swissspidy deleted
Note: See TracTickets for help on using tickets.