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

WordPress Trac noreply at wordpress.org
Tue Jul 26 17:29:56 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:                  |     Focuses:
----------------------------+-----------------------

Comment (by Otto42):

 Ugh. Okay, here's the differences between all of these.

 1. Normal upgrade (old way). Uses the Plugin_Upgrader_Skin to display the
 relevant information about the upgrade process. Calls the
 Plugin_Upgrader::upgrade() function to do the upgrade. This upgrade()
 function deactivates the plugin silently (without calling deactivation
 functions) before upgrading. Afterwards, the Plugin_Upgrader_Skin code
 (yes, the skin) includes an iframe which calls the activate-plugin method
 to display the "Plugin reactivated successfully" message.

 2. Bulk Upgrade: Does not deactivate plugins in the first place. If they
 change their main plugin file names in this process, they will thus not be
 loaded and thus will be deactivated, silently.

 3. Shiny updates: Calls the bulk_upgrade() function via an ajax request,
 so essentially behaves identically to method 2.

 Basically, the ajax action needs to check if the plugin in question was
 active before the upgrade, and reactivate it afterwards if so. Or to just
 behave more like method 1, since it's only upgrading a single plugin.

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


More information about the wp-trac mailing list