• Resolved Dave_S

    (@dave_s)


    Hi,

    I’m using AMP 0.3.2. together with Glue for Yoast SEO & AMP 0.3.2.

    I’m getting the following error messages in the validator:

    The mandatory text (CDATA) inside tag ‘head > style : boilerplate’ is missing or incorrect. (see https://www.ampproject.org/docs/reference/spec.html#required-markup)

    The mandatory text (CDATA) inside tag ‘noscript > style : boilerplate’ is missing or incorrect. (see https://www.ampproject.org/docs/reference/spec.html#required-markup)

    The failing code looks like this:

    <script src="https://cdn.ampproject.org/v0.js" async></script>
    <style amp-boilerplate>body {
    -webkit-animation:0 8s steps(1,end) 0 1 normal both;
    -moz-animation:0 8s steps(1,end) 0 1 normal both;
    -ms-animation:0 8s steps(1,end) 0 1 normal both;
    animation:0 8s steps(1,end) 0 1 normal both;
    }
    
    to {
    visibility:visible;
    }</style>
    <noscript><style amp-boilerplate>body {
    -webkit-animation:none;
    -moz-animation:none;
    -ms-animation:none;
    animation:none;
    }</style></noscript>

    Can this be caused by an installed plugin or is it another problem? Thanks for any help!

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Dave_S

    (@dave_s)

    Ok, just tracked it down after some research.

    Apparently spaces or line breaks are not allowed in the boilerplate code. They got inserted to my site by W3 Total Cache plugin when Inline CSS minify was enabled. After disabling it, the code now validates just fine.

    Hi

    I want to know where to add this code because I am also getting this error.

    Details:
    The mandatory text (CDATA) inside tag ‘head > style[amp-boilerplate]’ is missing or incorrect.

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

The topic ‘Validation error in head section’ is closed to new replies.