Opened 8 years ago
Last modified 2 years 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 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:
- On Plugins Screen, select an activated plugin.
- From "Bulk Actions" select "Delete"
- 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)
Change History (17)
#2
@
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
@
8 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
@
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
#7
@
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.
Thanks for your report. I can confirm the issue.