[wp-trac] [WordPress Trac] #14915: Fix activation hook inconsistency

WordPress Trac wp-trac at lists.automattic.com
Sat Sep 25 11:24:04 UTC 2010

#14915: Fix activation hook inconsistency
 Reporter:  nacin         |       Owner:             
     Type:  defect (bug)  |      Status:  new        
 Priority:  normal        |   Milestone:  3.1        
Component:  Plugins       |     Version:  2.9        
 Severity:  normal        |    Keywords:  needs-patch
Changes (by dd32):

  * keywords:  has-patch => needs-patch


 The Deactivation code which is run is run "silently" that is, no
 deactivation hooks are called. The removed lines in the patch result in
 the plugin being active on the site & maintainence mode not being
 activated for non-bulk upgrades.

 The idea there is that Singular plugin upgrades would not affect the
 functionality of the website.

 There are 2 inconsistencies here which may want to be looked at:

  * Plugin is deactivated for entirety of upgrade process (Deactivation
 hook NOT run)
  * Re-activation occurs, This step reactivates the plugin on the site, and
 does a sanity check of the php file (ie. Plugin doesnt re-activate if the
 new version causes a fatal error) (Activaton hook RUN)

  * Website is put into Maintainence Mode
  * Plugin upgrade is done (Deactivation hook is NOT run, Activation hook
 is NOT run)
  * Website is removed from Maintainence Mode.

 It doesn't appear that a fatal-error check is ever done on the bulk
 upgrade process however to me.

 It might be worth getting rid of the singular upgrade mode and implement
 everything fully in the bulk upgrade functionality, That would include
 adding a no-fatal-error check to the bulk upgrade process for active
 plugins (And if one is hit deactivate it)

Ticket URL: <http://core.trac.wordpress.org/ticket/14915#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list