[wp-trac] [WordPress Trac] #59433: Plugin deletion results must be stored in an option instead of a transient to avoid the transient being removed on shutdown

WordPress Trac noreply at wordpress.org
Sat Sep 23 14:03:21 UTC 2023


#59433: Plugin deletion results must be stored in an option instead of a transient
to avoid the transient being removed on shutdown
--------------------------+-----------------------------
 Reporter:  kkmuffme      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Plugins       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59433>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list