Make WordPress Core

Opened 8 years ago

Last modified 20 months ago

#38112 assigned defect (bug)

Deleting an Active Plugin via Bulk Actions Fails Silently

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

Description

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

Result:

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 8 years ago.
38112.2.diff (4.0 KB) - added by swissspidy 8 years ago.

Download all attachments as: .zip

Change History (17)

#1 @swissspidy
8 years ago

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

Thanks for your report. I can confirm the issue.

@swissspidy
8 years ago

#2 @swissspidy
8 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
8 years ago

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

https://cldup.com/VJG86VzUPL.png

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:

https://cldup.com/TRb3vAXBgW.png

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

https://cldup.com/LxMbbeZEQG.png

#4 @swissspidy
8 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.


8 years ago

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


8 years ago

@swissspidy
8 years ago

#7 @swissspidy
8 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.


8 years ago

#9 @desrosj
5 years ago

  • Keywords has-patch added; needs-patch removed

#10 @SergeyBiryukov
5 years ago

#47337 was marked as a duplicate.

#11 @SergeyBiryukov
4 years ago

#49887 was marked as a duplicate.

#12 @swissspidy
3 years ago

  • Owner swissspidy deleted

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


2 years ago

#14 @azouamauriac
2 years ago

  • Keywords needs-refresh added

#15 @SergeyBiryukov
20 months ago

#56613 was marked as a duplicate.

Note: See TracTickets for help on using tickets.