#59433 closed defect (bug) (fixed)
Plugin deletion results must be stored in an option instead of a transient to avoid the transient being removed on shutdown
Reported by: | kkmuffme | Owned by: | swissspidy |
---|---|---|---|
Milestone: | 6.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Plugins | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-admin/plugins.php#L431
When using an external object cache, if any plugin hooks wp_cache_flush
on shutdown hook/register shutdown function, this transient will be removed and the plugin delete result is never shown to the user.
The result should be stored in an option instead of a transient to fix this problem.
You could argue that you shouldnt call cache flush on shutdown, however this is often the only way to fix compatibility issues where plugins do not remove their data from cache on uninstall and you are left with a broken site after uninstalling.
Change History (6)
This ticket was mentioned in PR #6014 on WordPress/wordpress-develop by @kkmuffme.
10 months ago
#1
- Keywords has-patch added
This ticket was mentioned in Slack in #core by kkmuffme. View the logs.
10 months ago
@SergeyBiryukov commented on PR #6014:
4 months ago
#6
Thanks for the PR! Looks like this was merged in r57586.
Store delete result in non-autoloaded option instead of cache/transient to ensure it cannot be accidentally removed by other plugins that flush the cache.