• Resolved carylwills

    (@carylwills)


    Hi,
    I’ve just installed the Content Control plugin and when trying to activate it I get this message:

    The plugin does not have a valid header.

    I turned on WP_DEBUG and immediately try to activate the Content Control plugin. I get a number of instances of the message below (about 7 or 8) followed by the “The plugin does not have a valid header.” message.

    Notice: WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.) in /home/c1racing/public_html/dev/wp-includes/functions.php on line 5313
    The plugin does not have a valid header.

    On the basis that nothing else is going on in the website (I’m trying this on a copy of my live site) these DEBUG messages must be generated by the code that is activating the Content Control plugin. I’m running WordPress 5.7 and PHP 7.3.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Daniel Iser

    (@danieliser)

    @carylwills – Appreciate the report, that said it sounds like the same issue several others have reported, not just with our plugin, but specifically with the Plugin Installer page. All users so far have reported that if they go to the All Plugins page and activate Content Control from there, they do not see this issue.

    Since we have reports of other plugins also seeing this randomly & have found reports from many plugin of this issue for the past few years, I’m assuming it is actually something in WP core as nothing in our plugin headers has changed.

    Just filed a ticket for core here: https://core.trac.ww.wp.xz.cn/ticket/52874#ticket

    As to the other errors, I just checked our code and cannot find any usage of wp_add_inline_script, also checked our usage of wp_localize_script which calls wp_add_inline_script too, but our usage is correct, it already passes an array, never a string.

    Hope that helps.

    Thread Starter carylwills

    (@carylwills)

    @danieliser – Thanks for the quick response and for filing a core ticket. You are right – Activate from the Plugins list page works fine, but Activating from the Add Plugins page doesn’t.

    Plugin Author Daniel Iser

    (@danieliser)

    @carylwills – Can you tell me what hosting your using? Had a suggestion this may happen more often on a very specific host and want to see if that is the case here as well.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘The plugin does not have a valid header.’ is closed to new replies.