[wp-trac] Re: [WordPress Trac] #9708: Multiple plugins in the single folder can cause unexpected situations with Upgrades (was: Create a Testcase for multiple Plugins in the same directory.)

WordPress Trac wp-trac at lists.automattic.com
Sun May 3 00:33:12 GMT 2009


#9708: Multiple plugins in the single folder can cause unexpected situations with
Upgrades
-----------------------------+----------------------------------------------
 Reporter:  hakre            |       Owner:                
     Type:  defect (bug)     |      Status:  new           
 Priority:  normal           |   Milestone:  Future Release
Component:  Upgrade/Install  |     Version:  2.8           
 Severity:  normal           |    Keywords:  needs-patch   
-----------------------------+----------------------------------------------
Changes (by DD32):

  * component:  General => Upgrade/Install
  * owner:  anonymous =>
  * milestone:  2.8 => Future Release
  * keywords:  => needs-patch
  * type:  task (blessed) => defect (bug)


Comment:

 Thanks for the utterly useless OP in the ticket.. (Seriously, Trac is not
 for testing things out, Do it yourself and report it as a bug if it
 doesn't work for you)

 There is a slight rare case in this however, Which I've been aware of, But
 havnt had anyone actually have an issue with yet.

 If multiple plugins exist in a directory, And one of the plugins is then
 selected for upgrade this will happen:
  * The selected plugin will be deactivated
    * Not the other plugins in the directory, They stay activated during
 the upgrade
  * The selected plugin gets upgraded to the latest
    * Note: If the other plugins didnt exist in the upgrade package,
 they're completely removed.
      * Not changing this fact anytime soon
  * The upgrade suceeds
    * Selected plugin is upgraded
      * As well as any other plugin which existed within the archive.
    * The selected plugin goes through the re-activation error-check
      * The upgrader assumes the FIRST plugin it finds is the actual plugin
 that got upgraded (The reasoning for this is, That the plugin filenames DO
 change between upgrades sometimes. A better method is  to check the plugin
 header "Name" and base it off that if possible, else revert to the first
 plugin)
      * The other plugins do NOT get run through this, since they were
 never deactivated.


 This has NOTHING to do with the WordPress.org side, it makes NO difference
 no matter what angle you look at it from. Nor is trac for Test cases.

 An example of a plugin which did this, Was NextGen Gallery, However, Its
 no longer doing it that way - For whatever reason.
 http://plugins.svn.wordpress.org/nextgen-gallery/trunk/nggwidget.php
 suggests something to do with the fact the widget plugin could be
 changed/different from what was actually included in the upgrade archive.

 There are not many plugin which have multiple plugins per directory, Most
 are now in separate archives.

 Changed Title to reflect the actual issue.

 Changed Milestone to Future pending a patch (Thats tested). But Any patch
 will be for 2.9 at this stage, Its simply too late to change it in 2.8 &
 get adequate testing for whatever process is chosen.

 Personally i'd prefer to say "NO! Only one plugin per directory!" and
 close this as wontfix, One-plugin-per-directory has been the way that has
 been prefered for awhile now, But isnt actually enforced at a code-level,
 or WordPress.org Plugin hosting either.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9708#comment:5>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list