Support » Plugin: Breeze - WordPress Cache Plugin » New version of Breeze causes AMP validation errors

  • Shortly after updating to 1.1.10, Google started notifying me that my AMP pages were failing validation. If I disable Breeze and purge Varnish, all is well. But as soon as I reactivate Breeze, even if only the basic cache option is selected, the posts will fail validation. So, for now, Breeze is disabled on my system.

    Here are the three validation errors Google reports
    1. A tag on this page requires an AMP component ‘script’ tag, which is missing.
    2. Custom JavaScript is not allowed.
    3. Disallowed attribute or attribute value present in HTML tag.

    And here is the response I got when checking with the AMP folks about this problem.

    `Humm. The validation errors are coming from these lines:

    <script type=’application/javascript’ src=’https://cdn.ampproject.org/v0.js’></script&gt;
    <script type=’application/javascript’ src=’https://cdn.ampproject.org/v0/amp-analytics-0.1.js’></script&gt;
    <script type=’application/javascript’ src=’https://cdn.ampproject.org/v0/amp-bind-0.1.js’></script&gt;
    <script type=’application/javascript’ src=’https://cdn.ampproject.org/v0/amp-form-0.1.js’></script&gt;
    Each of these are supposed to have the async attribute, they should not have an type=’application/javascript’ attribute, and the last three are missing the custom-element attribute.

    It seems like you have some plugin that is changing these elements for some reason. If I had to guess, I’d say the culprit is the Breeze caching plugin. Specifically it seem to be caused by the “deferred loading” functionality of that plugin. If you can turn that functionality off, that should fix the problem.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author adeelkhan

    (@adeelkhan)

    While insert the JS file path JS files with deferred loading option. It will add defer just before the source URL
    <script type=’application/javascript’ defer src=’your-comain/wp-content/themes/js/file_name.js’></script>
    The validations errors you have mentioned have improper handling of <script> tag.
    Breeze applies only defer at source URL not changing the <script> tag.

    Thread Starter edjarrett

    (@edjarrett)

    I wonder then why these errors started when I installed the new version of Breese and go away when I deactivate it?

    Thread Starter edjarrett

    (@edjarrett)

    The folks with the AMP plugin passed this on to me.

    This is the source for where Breeze is adding those script tags: https://plugins.trac.wordpress.org/browser/breeze/tags/1.1.10/inc/minification/breeze-js-deferred-loading.php#L386

    Plugin Author adeelkhan

    (@adeelkhan)

    The above-mentioned script tag just add the “defer” of the provided JS file path under the option “JS files with deferred loading”
    if there is no need to add “defer” at JS file path so you can exclude it.
    The functionality is optional and it activates while you enter the JS file path in it.

    Thread Starter edjarrett

    (@edjarrett)

    So please tell me how I can fix this. Or, at the very least, how I can revert back to the earlier release that does actually work. Or do I need to go back to WP Rocket?

    Plugin Author adeelkhan

    (@adeelkhan)

    you can simply remove the path of the file from the option “JS files with deferred loading”.

    Thread Starter edjarrett

    (@edjarrett)

    That will be difficult since that field is empty.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘New version of Breeze causes AMP validation errors’ is closed to new replies.