[wp-trac] Re: [WordPress Trac] #6262: Automatic Plugin Upgrade could break new plugins that require special instructions for upgrading

WordPress Trac wp-trac at lists.automattic.com
Mon Mar 17 23:46:31 GMT 2008


#6262: Automatic Plugin Upgrade could break new plugins that require special
instructions for upgrading
--------------------------------------+-------------------------------------
 Reporter:  nerrad                    |        Owner:  anonymous
     Type:  defect                    |       Status:  new      
 Priority:  high                      |    Milestone:  2.5      
Component:  Administration            |      Version:  2.5      
 Severity:  major                     |   Resolution:           
 Keywords:  dev-feedback 2nd-opinion  |  
--------------------------------------+-------------------------------------
Changes (by DD32):

  * keywords:  => dev-feedback 2nd-opinion

Comment:

 > Does this disable the plugin first and then reactivate it after the
 download or does the automatic download just overwrite the files?

 Simply overwrites the files, The same that would happen if the user was to
 manually upgrade.

 No hooks are run to notify the plugin that an upgrade has taken place,
 This is due to the old plugin being loaded at the time of upgrading.

 I asked on #wordpress-dev about it, And it seemed to be agreed on that
 this just automates the process most users follow anyway, If a plugin
 needs to do an upgrade proceedure, then it should reconise when its been
 updated(ie. like wordpress does with its database version); and perform an
 action then.

 >There doesn't seem to be anyway for plugin authors to indicate special
 instructions for upgrading from older versions.

 Correct, No extra screens are shown to the blog owner.

 >Create a new tag for the readme.txt file in plugin packages (i.e. Special
 Instructions) so that when the readme.txt file is parsed it will put in an
 alert and display the special instructions in the plugin list. Plugin
 authors would then have a way of notifying potential users of possible
 problems with a simple automatic upgrade.

 I was thinking of maybe the readme.txt should be parsed, and if a section
 labled 'upgrading'(or similar) exists, then maybe WordPress could show
 that afterwards?



 Also note, that if a plugin was previously at plugins/joes.php, when the
 upgrader runes over it, it'll exist at /plugins/joes/joes.php, In that
 case, The plugin will no longer be activated, and needs to be activated
 manually. I was thinking of adding a section to the bottom of the upgrade
 page "This plugin is no longer Activated, Do you wish to re-activate?
 [Yes] [No]"

 If however, it existed at /plugins/joes/joes.php and it gets upggraded to
 /plugins/joes/joes.php, it'll stay activated.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/6262#comment:1>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list