[wp-trac] [WordPress Trac] #36373: Plugin update fails silently when using zipfile without subdirectory

WordPress Trac noreply at wordpress.org
Wed Mar 30 07:47:39 UTC 2016


#36373: Plugin update fails silently when using zipfile without subdirectory
-----------------------------+-----------------------------
 Reporter:  BjornW           |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Upgrade/Install  |    Version:  4.4.2
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 While [https://github.com/afragen/github-updater/issues/368 extending
 github-updater for use with Bitbucket Server] aka Stash I've noticed that
 the WordPress upgrader/updater needs a plugin update in a zipfile within a
 subdirectory named after the plugin slug. E.g.

 '''Working zipfile contents:'''
 {{{
 plugin_slug
   plugin.php
   another_file.php
   some_directory/
 }}}
 '''Failed zipfile contents:'''
 {{{
 plugin.php
 another_file.php
 some_directory/
 }}}
 ''notice the missing subdirectory''

 Without the correct zipfile structure the WordPress plugin update process
 looks successful, but it will silently fail and the plugin you wanted to
 update just disappears. Instead of failing silently, I'd suggest to inform
 the user that an incorrect update format was supplied. Btw the manual
 'upload new plugin' in wp-admin/plugin-install.php?tab=upload does not
 care about having a subdirectory or not.
 '''
 Steps to reproduce this issue:'''
 - create a zipfile with the plugin files in the root
 - use an external updater such as github-updater to deliver the zip file
 to  WordPress (as if using api.wordpress.org)
 - update your plugin
 - the plugin update process will state it was successful, but your plugin
 will be de-activated due to it being removed by the update process without
 the updated replacement.

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


More information about the wp-trac mailing list