• I get many AMP validation errors on all my sites:

    AMP validation had errors:
    validator.js:390
    
    https://domain.org/article/amp/:1:0 The tag 'input' is disallowed.
    https://domain.org/article/amp/:1:84 The tag 'input' is disallowed.
    https://domain.org/article/amp/:12:0 The tag 'script' is disallowed except in specific forms.
    https://domain.org/article/amp/:21:10 The attribute 'style' may not appear in tag 'img'. (see https://www.ampproject.org/docs/reference/amp-img.html)
    https://domain.org/article/amp/:26:0 The tag 'script' is disallowed except in specific forms.
    https://domain.org/article/amp/:29:0 The tag 'script' is disallowed except in specific forms.
    https://domain.org/article/amp/:30:0 The tag 'head > style : boilerplate - old variant' is deprecated - use 'head > style : boilerplate' instead. (see https://www.ampproject.org/docs/reference/spec.html#required-markup)
    https://domain.org/article/amp/:30:0 The mandatory text (CDATA) inside tag 'head > style : boilerplate - old variant' is missing or incorrect. (see https://www.ampproject.org/docs/reference/spec.html#required-markup)
    https://domain.org/article/amp/:45:0 The attribute 'rel' in tag 'link rel=' is set to the invalid value 'manifest'.
    https://domain.org/article/amp/:51:0 The tag 'script' is disallowed except in specific forms.
    https://domain.org/article/amp/:67:631 The tag 'noscript enclosure for boilerplate' appears more than once in the document. (see https://www.ampproject.org/docs/reference/spec.html#required-markup)

    how to avoid that?

    https://ww.wp.xz.cn/plugins/amp/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Remove the bad elements ?

    Turn off the plugin injecting scripts into the posts, or work with that plugin author to create filter/exception for /amp/ endpoint.

    Turn off minification of the /amp/ endpoint from your CDN/plugin.

    Good luck!

    Thread Starter Jochen Gererstorfer

    (@gmmedia)

    OK, so the plugin is not user friendly yet?

    No; the plugin is user friendly.
    It cannot fix ‘bad behavior’ of other plugins or correct issues with your content such as inline styles, improper use of adsense or google anayltics for the amp endpoint.

    See the docs website for the plugin for more info, and read through some of the threads.

    Google has certain ‘requirements’ for the amp format; this plugin takes the content from your content box and makes a new CSS endpoint at yourpost/amp/ however it cannot fix things other plugins or bad theme programming might do to inject things where they should not be, or content issues.

    So, YOU have to debug what is breaking the /amp/ version if you want to use it — you don’t have to. Your normal responsive mobile version will keep working for mobile users; this is just for those who want to take advantage of it.

    If you don’t know how to debug your site for /amp/ you should likely skip it for now.

    Thread Starter Jochen Gererstorfer

    (@gmmedia)

    I don’t see that other plugins and themes will care about the AMP requirements.

    If a user have to adjust other plugin and theme files, to make the AMP plugin work, I think we can say it’s not user friendly. 99% of the WP users can’t do that.

    It’s user friendly as it adds /amp/ support.

    It does not fix your website for you.

    It makes it so you don’t have to build your own hooks for adding the rel=amp location, generates style sheet compatible with amp format.

    The rest is up to you. It does exactly what it’s designed to do.

    But I don’t need to argue the point, it’s self evident.

    If you’re new to webdev, just don’t use it. Your site likely won’t benefit from it anyway.

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

The topic ‘AMP validation errors’ is closed to new replies.