[wp-trac] [WordPress Trac] #37470: Shiny Updates: Erroneous Plugin Deactivation

WordPress Trac noreply at wordpress.org
Tue Jul 26 22:15:22 UTC 2016


#37470: Shiny Updates: Erroneous Plugin Deactivation
----------------------------+-----------------------
 Reporter:  voldemortensen  |       Owner:
     Type:  defect (bug)    |      Status:  reopened
 Priority:  normal          |   Milestone:  4.6
Component:  Plugins         |     Version:  4.2.4
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:
----------------------------+-----------------------

Comment (by dd32):

 Yeah, "Bulk" upgrades don't perform the deactivate-reactivate dance as no-
 one could figure out a good way to do it without breaking everything.
 Simply calling `activate_plugins()` in an AJAX request isn't enough, you
 need to handle the error conditionals from that (which is a forced
 redirect IIRC, at least in the case of fatals).

 This isn't new to 4.6, is reproducible in older versions, and quite
 honestly, is low priority in the scheme of things. If there's a viable fix
 for 4.6, then lets do it, otherwise punting is fine.
 Handling fatal errors during updates (also not a regression from 4.5, but
 a regression from a much older version) is a much higher priority issue
 than the filename changing, which this patch can't handle properly (The
 deactivate and activate calls *have* to be in separate processes, or at
 least the deactivate has to happen before plugin inclusion)

 > Do you remember why wp_ajax_update_plugin() uses
 Plugin_Upgrader::bulk_upgrade() and not Plugin_Upgrader::upgrade()?
 IIRC Bulk upgrades were used simply to avoid the non-bulk upgrade methods
 which had the deactivate-reactivate functionalities, plus it has a better
 API. It was also the flow that most users were using at the time and IIRC
 not something that shiny updates pioneered.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37470#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list