Opened 12 years ago
Closed 12 years ago
#21954 closed defect (bug) (duplicate)
Nested plugins cause activation link error
Reported by: | prometh | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | major | Version: | 3.4.2 |
Component: | Upgrade/Install | Keywords: | |
Focuses: | Cc: |
Description
My plugin, WP-HTML-Compression includes another of my plugins, Absolute-to-Relative-URLs from /wp-content/plugins/wp-html-compression/external/ after first checking if it already exists.
The problem is that nested plugin has a WordPress header which leads to the activation link being:
/wp-admin/plugins.php?action=activate&plugin=wp-html-compression%2Fexternal%2Fabsolute-to-relative-urls.php&_wpnonce=...
and results in a "The plugin does not have a valid header" error.
A temporary solution is to remove the header from the nested plugin.
Change History (3)
Note: See
TracTickets for help on using
tickets.
For reference (in case the plugin gets updated) the version which can trigger this is 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