[wp-trac] [WordPress Trac] #35277: Install/Activate issue: The plugin does not have a valid header.
WordPress Trac
noreply at wordpress.org
Thu Dec 31 20:06:06 UTC 2015
#35277: Install/Activate issue: The plugin does not have a valid header.
--------------------------+-----------------------------
Reporter: wpweaver | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Plugins | Version: 4.4
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
This may be a duplicate, but I could not find any fixed or invalid
resolutions.
Why does the code in the plugin installer KEEP looking for a new plugin
header sequence after is has found a valid on in the plugin's root (e.g.,
the "Plugin Name:" and associated entries), while the Activate action from
the Installed Plugins page does not?
This report is triggered by the latest version of TGM Plugin Activation
(2.5.2), a fairly widely used plugin accessory library. For whatever
reason, TGMPA added a valid looking plugin header into its library file
which my plugin included in a sub-directory.
The INSTALL PLUGIN / Activate sequence gives priority to the TGMPA buried
in a sub-directory entry, and thus issues the The plugin does not have a
valid header. message. (Line 938 of /wp-admin/includes/plugin.php. The
$plugin parameter has the "wrong" name at this point.)
On the other hand, the Activate action from the Installed Plugins page
seems to use a DIFFERENT algorithm to get the plugin name, and will
properly activate the plugin.
It would seem to me that the logic of the Install / Activate and Installed
Plugins / Activate commands should be identical and consistent. It does
seem the Installed Plugins / Activate response is correct, while the
Install / Activate improperly gives priority to plugin headers in sub-
directories.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35277>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list