[wp-trac] [WordPress Trac] #51857: Add rollback for failed plugin/theme updates

WordPress Trac noreply at wordpress.org
Thu Dec 3 02:30:49 UTC 2020


#51857: Add rollback for failed plugin/theme updates
-----------------------------+-----------------------
 Reporter:  pbiron           |       Owner:  pbiron
     Type:  enhancement      |      Status:  assigned
 Priority:  normal           |   Milestone:  5.7
Component:  Upgrade/Install  |     Version:
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+-----------------------

Comment (by afragen):

 It seems that some additional error report is needed. In referencing the
 core failure data provided by @dd32 in
 https://wordpress.slack.com/archives/CULBN711P/p1606869594134200 it seems
 that `copy_dir()` is a focal point of failure.

 In digging a little if `$wp_filesystem->dirlist( $from )` is false what
 happens is the contents of the plugin folder is deleted and the folder
 remains.

 I added a patch to test for this and return a `WP_Error`. At a minimum it
 can give us more information. Perhaps it can mitigate this type of
 failure.

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


More information about the wp-trac mailing list