Skip to content
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

Extra plugin header in class-genesis-simple-hooks.php results in “The plugin does not have a valid header” during activation #28

Open
nickcernis opened this issue Dec 17, 2019 · 0 comments

Comments

@nickcernis
Copy link
Contributor

nickcernis commented Dec 17, 2019

Describe the bug
On some WordPress installs, the extra plugin header in includes/class-genesis-simple-hooks.php results in “this plugin does not have a valid header” when clicking the “Activate” link that appears after installing a plugin from WordPress.org via the Add New plugin link:

Screen Shot 2019-12-17 at 10 29 34

Screen Shot on 2019-12-17 at 10-30-02

Reported to our support team and at https://wordpress.org/support/topic/compatability-with-latest-version-of-wp-error-message-no-valid-header/.

People can work around this for now by activating the plugin from the plugins page instead. This error is specific to the Activate button at the end of the “install from WordPress.org” user flow.

To Reproduce
I can only reproduce this on WP Engine servers so far (not locally), but it may affect other hosts too. It's not clear yet why it's specific to some servers only, or why WP interprets the header in that file as containing errors.

Steps to reproduce the behavior:

  1. Visit Plugins → Add New.
  2. Search for Genesis Simple Hooks.
  3. Install the plugin.
  4. Click “Activate” after the plugin is installed.

Expected behavior
The plugin should be activated without error.

Version

  • WP 5.3.1.

To fix
Removing the class header entirely fixes the issue.

Specifically, this line appearing in includes/class-genesis-simple-hooks.php seems to trigger the error:

* Plugin Name: Genesis Simple Hooks

I confirmed this on the affected server by:

  1. Installing the plugin from WP.org.
  2. Editing class-genesis-simple-hooks.php to remove the plugin name line.
  3. Visiting example.com/wp-admin/plugin-install.php?s=genesis+simple+hooks&tab=search&type=term and clicking “Activate”. The plugin then activates correctly with no error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant