[wp-trac] [WordPress Trac] #49400: Enable maintenance mode when a plugin auto-updates

WordPress Trac noreply at wordpress.org
Tue Feb 11 20:13:05 UTC 2020


#49400: Enable maintenance mode when a plugin auto-updates
-------------------------------------+----------------------
 Reporter:  desrosj                  |       Owner:  desrosj
     Type:  enhancement              |      Status:  closed
 Priority:  normal                   |   Milestone:  5.4
Component:  Upgrade/Install          |     Version:
 Severity:  normal                   |  Resolution:  fixed
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+----------------------
Changes (by desrosj):

 * owner:  (none) => desrosj
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"47275" 47275]:
 {{{
 #!CommitTicketReference repository="" revision="47275"
 Upgrade/Install: Enable maintenance mode when plugins are auto-updated.

 When an attempt is made to update an active plugin automatically, there is
 the potential currently for two negative scenarios:

 - The plugin can be deactivated if the Plugins admin screen is loaded when
 the plugin update is incomplete, causing a PHP error.
 - The WSOD protection could be triggered, sending a false alarm email to
 the site administrator.

 By enabling maintenance mode before an active plugin update is attempted,
 these scenarios can be avoided.

 This change implements the same approach as the `Theme_Upgrader` class of
 using the `upgrader_pre_install` and `upgrader_post_install` hooks to
 toggle maintenance mode.

 Props desrosj, SergeyBiryukov.
 Fixes #49400.
 }}}

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


More information about the wp-trac mailing list