[wp-trac] Re: [WordPress Trac] #2927: hooks for upgrade and pre_upgrade

WordPress Trac wp-trac at lists.automattic.com
Sun Jan 6 03:05:47 GMT 2008

#2927: hooks for upgrade and pre_upgrade
 Reporter:  ryanscheuermann                             |        Owner:  anonymous
     Type:  enhancement                                 |       Status:  new      
 Priority:  normal                                      |    Milestone:  2.5      
Component:  Administration                              |      Version:  2.1      
 Severity:  normal                                      |   Resolution:           
 Keywords:  upgrade plugin-management has-patch commit  |  
Comment (by darkdragon):

 The problem is not an issue. If a plugin fails, then it will bring down
 the entire process and nothing will show up nor will the user be able to

 The {{{@include(PLUGINPATH)}}} prevents an error/warning when including
 the file if it does not exist for example. It does not prevent errors from
 halting the main process.

 The way the sandbox works for the plugins would be not difficult for the
 upgrade, but would be slightly pointless. I'm thinking that the same could
 be applied to make sure that nothing breaks. However, since there is no
 'init' hook called in the upgrader, plugins should be able to run. That is
 if the plugin was written correctly. If it was not then there might be an
 issue with the plugin calling !WordPress functions which don't exist
 during an upgrade which will bring the upgrader down.

 '''Possible Solution'''

 I was thinking about when the upgrade is started that it would go to a
 hidden step of running pre upgrade process for each plugin and disabling
 automatically the plugins which do not play nice. This does fall within
 the bounds of #2377, which was closed because of breaking many plugins.
 However, the upgrade process will also get an upgrade which would display
 which plugins failed during the pre-upgrade process and allow still active
 plugins that didn't fail to display their status.

 The administration plugin's panel will get an extra button for enabling
 all previously disabled plugins, which will always be saved when the
 disable all plugins button is checked and during the preupgrade failure.
 This will allow the user access to enable previously enabled plugins with
 one click and have them all go through the activation sandbox process.

 If none of this is needed, since it would make the upgrade and the patch a
 lot more difficult to write. If no one is paranoid, I think the first
 patch combined with elements of the second patch for the plugins.php might
 be enough to satisfy this ticket.

Ticket URL: <http://trac.wordpress.org/ticket/2927#comment:13>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list