Support » Plugin: AMP » AMP pages suddenly failing validation

  • Resolved edjarrett

    (@edjarrett)


    I have been using the AMP plugin for some time now without an issue. Suddenly today Google reported that I had 86 posts that were failing validation. Each of them had three errors.
    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.

    I have disabled all recently updated plugins, flushed the cache and purged my CDN. But it made no difference. I ran the AMP Validator on the page listed above and it shows that I have several javascript tags, but when I view source on the actual page, I do not see any of what the AMP Validator is complaining about.

    I don’t know what else to do at this point. I suspect that tomorrow Google will invalidate even more pages. Any help would be greatly appreciated.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    Humm. The validation errors are coming from these lines:

    <script type='application/javascript' src='https://cdn.ampproject.org/v0.js'></script>
      <script type='application/javascript' src='https://cdn.ampproject.org/v0/amp-analytics-0.1.js'></script>
      <script type='application/javascript' src='https://cdn.ampproject.org/v0/amp-bind-0.1.js'></script>
      <script type='application/javascript' src='https://cdn.ampproject.org/v0/amp-form-0.1.js'></script>

    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. We also have documentation now for AMP-compatible caching plugins.

    • This reply was modified 1 year, 2 months ago by Weston Ruter.
    Thread Starter edjarrett

    (@edjarrett)

    Thanks for the info. I had previously disabled the Breeze plugin without any effect. But I urged the Varnish cache this time, along with disabling Breeze, and that allows the posts to validate. But even with no options selected Breeze is still causing this. So I will contact CloudWays about this issue. Thanks again for your direction.

    The Problem Could Be with Yoast SEO if you are using one try disabling the “Enhanced Slack Sharing” by going into Yoast SEO “Feature” if you need help to find out check this

    Thread Starter edjarrett

    (@edjarrett)

    Thanks. I tried that, but it did not help. Cloudways says that it is not a problem with Breeze, but it clearly seems to be.

    Plugin Author Weston Ruter

    (@westonruter)

    Thread Starter edjarrett

    (@edjarrett)

    Thanks. I will pass that on.

    Thanks, @edjarrett. I’ll leave this topic open for now if you have any other questions on this as you connect with Cloudways.

    @edjarrett As we haven’t received a response, I’ll mark this as resolved. Feel free to open a new support topic if you continue to encounter issues, or reopen this topic and we’d be happy to assist. Thank you!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘AMP pages suddenly failing validation’ is closed to new replies.