[wp-trac] [WordPress Trac] #21954: Nested plugins cause activation link error

WordPress Trac wp-trac at lists.automattic.com
Fri Sep 21 01:00:06 UTC 2012


#21954: Nested plugins cause activation link error
-----------------------------+------------------------------
 Reporter:  prometh          |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Upgrade/Install  |     Version:  3.4.2
 Severity:  major            |  Resolution:
 Keywords:                   |
-----------------------------+------------------------------

Comment (by dd32):

 For reference (in case the plugin gets updated) the version which can
 trigger this is [http://plugins.svn.wordpress.org/wp-html-
 compression/tags/0.5.2/ 0.5.2]

 From memory, the upgrader simply assumes that there'll only be one plugin
 in a directory (which is the expected behaviour).

 The reason it picks up the 2nd plugin in this case is due to the function
 being used to find the plugins,  It uses the same function as the main
 plugin page uses (which has to find files in subdirectories), in the root
 directory of the plugin, so the main plugin file is in `.` but it will
 also search in `./plugin-sub-directory/` for plugins (which doesn't happen
 on the plugins page) -  I hope that's somewhat understandable..

 Solution here is to either
 1. Not look in subdirectories in plugin installer/upgrader contexts
 1. Sort the plugins before pulling the first one out, ensures that the
 plugin we use for the links is in the root plugin directory.

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


More information about the wp-trac mailing list