-
Notifications
You must be signed in to change notification settings - Fork 430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The plugin does not have a valid header. caused by TGMPA #499
Comments
@weavertheme If you have the file in a subdirectory, you should not get any conflicts. This may be a core bug. What would I need to do to reproduce the issue once I've got the zip ? |
I agree that this is a core bug, but other reports of having a valid Here's what happens (in the attached Show Posts 1.3.4 version - I've
This is because the Installer has found the TGMPA plugin header which is
Just the fact that these two operations give different results seems to That being said, there is some indication they won't see it that way and And I don't know how many plugins actually use TGMPA to recommend other I really don't know why it needs to be there, frankly. So, even though I
Bruce Wampler, Ph.D. Software developer |
Unfortunately attachments don't come through when you mail to GH. Could you please mail me the file directly ? |
Since 2.5.2 isn't a plugin, I do agree that these headers should not be there. They were added in 2004a2e |
I agree, they were only put in to make the initial .pot file generation easier. Other than that they serve no purpose unless and until TGMPA would ever get accepted as a feature plugin, so let's take them out for now. All the same, I'd still appreciate a copy of the plugin to test with to see what actually happens. For reference - the issue @weavertheme created in trac: https://core.trac.wordpress.org/ticket/35277 |
Will be happy to send directly, but would need an e-mail address as this
Bruce Wampler, Ph.D. Software developer |
@weavertheme Already posted one for you in #499 (comment) |
Got an official reply from the WP core team:
So, WP does not consider this a bug and won't change it. |
In general yes: however, as far as I know, in that case the "main" file for each plugin should be in the root directory of the plugin subdirectory, i.e.: /wp-plugins/plugin-name/ Not - as I gathered from your message was the case - in a subdirectory of the plugin directory. In that case, it should be ignored. Anyway, I received your file. It may be a little while before I have proper time to investigate, but will look into this. In the mean time, I'm removing the header for now. |
TGMPA Version 2.5.2 has this in the lead-in comment to class-tgm-plugin-activation.php:
Given that a goal of the library (at least as I use it) is to simplify all the stuff for recommending or requiring plugins, this comment code is NOT okay. I recently updated to 2.5.2 for a plugin (doesn't seem to bother themes), and the above comment definition OVERRIDES the real Plugin Name, etc. when my plugin is installed. This leads to the "The plugin does not have a valid header." message if the user tries to activate my plugin from the plugin installation screen.
The plugin has been installed, and WILL activate from the Installed Plugins page, but not from the plugin Activate link displayed right after the plugin is installed.
This may be dependent on where files are found. My plugin has the main plugin .php file on the plugin root directory, while the TGMPA php file is in a /includes sub-directory,
In my opinion, WP should NOT do this. If the WP plugin uploader finds a valid plugin header in the plugin root, it shouldn't keep looking in sub-directories, but apparently it does, and apparently the last file found with a valid Plugin Name: descriptor is used.
But that standard plugin header still does not belong in a library file such as TGMPA.
The text was updated successfully, but these errors were encountered: