[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
Wed Mar 19 13:37:39 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  |  
--------------------------------------+-------------------------------------
Comment (by nerrad):

 Replying to [comment:3 markjaquith]:
 > Any plugin that doesn't reference its files correctly is already broken.
 Whether it is the plugin upgrade putting it in an unexpected path or
 merely a fastidious manual installer, it's still a bug with the plugin.
 >
 > Same with special upgrade routines that trigger on activation hooks...
 that's bad practice.  Activation/deactivation hooks are for
 initialization/cleanup, not upgrades.  The plugin should handle upgrades
 through some other method.
 >
 > Neither of these problems are unique to the auto-upgrader.  These are
 problems that people could easily have run into with manual
 installation/upgrade as well.

 Mark, you make valid points and I don't disagree with them.  However, the
 automatic upgrader "forces" these standards.  At the very least if there
 is a "proper" way to be coding plugins THEN there must be 'clear
 documentation' for plugin authors regarding checking their work into the
 dev.wp-plugins.org repository.

 Not only that but the [http://codex.wordpress.org/Writing_a_Plugin Plugin
 documentation] on the [http://codex.wordpress.org WordPress Codex] needs a
 major overhaul before releasing the automatic upgrade feature to highlight
 standards plugin authors should follow.

 As for activation/deactivation hooks somebody needs to take a look at
 [http://codex.wordpress.org/Creating_Tables_with_Plugins this linky on the
 codex] because it sure doesn't seem to describe the "correct way" to use
 the 'register activation hook' as you've described Mark.

 I sure appreciate your input, at the very least it's given me some
 direction for reexamining how I setup my plugins :) IMHO I think this
 feature needs to be thought through some more and pushed back to 2.6 so
 more docs can put up outlining the standards this forces.

 Especially when the codex has this as a correct way to use the
 ‘register_activation_hook’.

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


More information about the wp-trac mailing list