Support » Plugin: Facebook Instant Articles & Google AMP Pages by PageFrog » where/how to change code to fix AMP errors?

  • Resolved mlennie

    (@mlennie)


    I installed AMP then pagefrog. Now google tells me I have 150 pages with errors. Below are the errors from one page. Question I have is where do I update the code for the AMP mobile version to be AMP compliant?

    Looking at the text version of the post there are not many html/css/script tags that I can update so I’m guessing that the errors are within the plugins themselves? How can you tell if the errors are plugin errors and if they are how/where can I update the plugins to be AMP complient?

    Hotjar script already loaded.
    validator.js:330 AMP validation had errors:Ex.error @ validator.js:330
    validator.js:330 https://artofheadshots.com/famous-portrait/amp/:170:0 The attribute 'type' may not appear in tag 'style amp-custom'. (see https://www.ampproject.org/docs/reference/spec.html#stylesheets)Ex.error @ validator.js:330
    validator.js:330 https://artofheadshots.com/famous-portrait/amp/:184:0 The attribute 'rel' in tag 'link rel=' is set to the invalid value 'stylesheet'.Ex.error @ validator.js:330
    validator.js:330 https://artofheadshots.com/famous-portrait/amp/:185:0 The attribute 'href' in tag 'link rel=stylesheet for fonts' is set to the invalid value 'https://artofheadshots.com/wp-includes/css/dashicons.min.css?ver=340057f9527af5c2fd7bd0cfc30d8627'. (see https://www.ampproject.org/docs/reference/spec.html#custom-fonts)Ex.error @ validator.js:330
    validator.js:330 https://artofheadshots.com/famous-portrait/amp/:186:0 The attribute 'href' in tag 'link rel=stylesheet for fonts' is set to the invalid value 'https://artofheadshots.com/wp-includes/css/admin-bar.min.css?ver=340057f9527af5c2fd7bd0cfc30d8627'. (see https://www.ampproject.org/docs/reference/spec.html#custom-fonts)Ex.error @ validator.js:330
    validator.js:330 https://artofheadshots.com/famous-portrait/amp/:226:0 The mandatory attribute 'src' is missing in tag 'amphtml engine v0.js script'. (see https://www.ampproject.org/docs/reference/spec.html#required-markup)Ex.error @ validator.js:330
    validator.js:330 https://artofheadshots.com/famous-portrait/amp/:226:0 The mandatory attribute 'async' is missing in tag 'amphtml engine v0.js script'. (see https://www.ampproject.org/docs/reference/spec.html#required-markup)Ex.error @ validator.js:330
    validator.js:330 https://artofheadshots.com/famous-portrait/amp/:226:0 The parent tag of tag 'script' is 'body', but it can only be 'head'. (see https://www.ampproject.org/docs/reference/spec.html#required-markup)Ex.error @ validator.js:330
    validator.js:330 https://artofheadshots.com/famous-portrait/amp/:236:0 The mandatory attribute 'src' is missing in tag 'amphtml engine v0.js script'. (see https://www.ampproject.org/docs/reference/spec.html#required-markup)Ex.error @ validator.js:330
    validator.js:330 https://artofheadshots.com/famous-portrait/amp/:236:0 The mandatory attribute 'async' is missing in tag 'amphtml engine v0.js script'. (see https://www.ampproject.org/docs/reference/spec.html#required-markup)Ex.error @ validator.js:330
    validator.js:330 https://artofheadshots.com/famous-portrait/amp/:236:0 The parent tag of tag 'script' is 'body', but it can only be 'head'. (see https://www.ampproject.org/docs/reference/spec.html#required-markup)Ex.error @ validator.js:330
    cdn.ampproject.org/v0/validator.js:330 https://artofheadshots.com/famous-portrait/amp/:247:0 The mandatory attribute 'src' is missing in tag 'amphtml engine v0.js script'. (see https://www.ampproject.org/docs/reference/spec.html#required-markup)Ex.error @ cdn.ampproject.org/v0/validator.js:330
    cdn.ampproject.org/v0/validator.js:330 https://artofheadshots.com/famous-portrait/amp/:247:0 The mandatory attribute 'async' is missing in tag 'amphtml engine v0.js script'. (see https://www.ampproject.org/docs/reference/spec.html#required-markup)Ex.error @ cdn.ampproject.org/v0/validator.js:330
    cdn.ampproject.org/v0/validator.js:330 https://artofheadshots.com/famous-portrait/amp/:247:0 The parent tag of tag 'script' is 'body', but it can only be 'head'. (see https://www.ampproject.org/docs/reference/spec.html#required-markup)Ex.error @ cdn.ampproject.org/v0/validator.js:330
    cdn.ampproject.org/v0/validator.js:330 https://artofheadshots.com/famous-portrait/amp/:257:0 The attribute 'type' in tag 'script type=application/ld+json' is set to the invalid value 'text/template'.Ex.error @ cdn.ampproject.org/v0/validator.js:330
    cdn.ampproject.org/v0/validator.js:330 https://artofheadshots.com/famous-portrait/amp/:257:0 The parent tag of tag 'script' is 'body', but it can only be 'head'.Ex.error @ cdn.ampproject.org/v0/validator.js:330
    cdn.ampproject.org/v0/validator.js:330 https://artofheadshots.com/famous-portrait/amp/:267:0 The attribute 'type' in tag 'script type=application/ld+json' is set to the invalid value 'text/template'.Ex.error @ cdn.ampproject.org/v0/validator.js:330
    cdn.ampproject.org/v0/validator.js:330 https://artofheadshots.com/famous-portrait/amp/:267:0 The parent tag of tag 'script' is 'body', but it can only be 'head'.Ex.error @ cdn.ampproject.org/v0/validator.js:330
    cdn.ampproject.org/v0/validator.js:330 https://artofheadshots.com/famous-portrait/amp/:341:9 The attribute 'type' in tag 'script type=application/ld+json' is set to the invalid value 'text/template'.Ex.error @ cdn.ampproject.org/v0/validator.js:330
    cdn.ampproject.org/v0/validator.js:330 https://artofheadshots.com/famous-portrait/amp/:341:9 The parent tag of tag 'script' is 'body', but it can only be 'head'.Ex.error @ cdn.ampproject.org/v0/validator.js:330
    cdn.ampproject.org/v0/validator.js:330 https://artofheadshots.com/famous-portrait/amp/:361:10 The attribute 'type' in tag 'script type=application/ld+json' is set to the invalid value 'text/javascript'.Ex.error @ cdn.ampproject.org/v0/validator.js:330
    cdn.ampproject.org/v0/validator.js:330 https://artofheadshots.com/famous-portrait/amp/:361:10 The parent tag of tag 'script' is 'body', but it can only be 'head'.Ex.error @ cdn.ampproject.org/v0/validator.js:330
    cdn.ampproject.org/v0/validator.js:330 https://artofheadshots.com/famous-portrait/amp/:399:105 The tag 'form' is disallowed.Ex.error @ cdn.ampproject.org/v0/validator.js:330
    cdn.ampproject.org/v0/validator.js:330 https://artofheadshots.com/famous-portrait/amp/:399:181 The tag 'input' is disallowed.Ex.error @ cdn.ampproject.org/v0/validator.js:330
    cdn.ampproject.org/v0/validator.js:330 https://artofheadshots.com/famous-portrait/amp/:399:280 The tag 'label' is disallowed.Ex.error @ cdn.ampproject.org/v0/validator.js:330
    cdn.ampproject.org/v0/validator.js:330 https://artofheadshots.com/famous-portrait/amp/:399:350 The tag 'input' is disallowed.Ex.error @ cdn.ampproject.org/v0/validator.js:330
    cdn.ampproject.org/v0/validator.js:330 https://artofheadshots.com/famous-portrait/amp/:400:183 The tag 'img' may only appear as a descendant of tag 'noscript'. Did you mean 'amp-img'? (see https://www.ampproject.org/docs/reference/amp-img.html)Ex.error @ cdn.ampproject.org/v0/validator.js:330
    cdn.ampproject.org/v0/validator.js:330 https://artofheadshots.com/famous-portrait/amp/:401:122 The tag 'img' may only appear as a descendant of tag 'noscript'. Did you mean 'amp-img'? (see https://www.ampproject.org/docs/reference/amp-img.html)Ex.error @ cdn.ampproject.org/v0/validator.js:330
    cdn.ampproject.org/v0/validator.js:330 https://artofheadshots.com/famous-portrait/amp/:407:2 The attribute 'type' in tag 'script type=application/ld+json' is set to the invalid value 'text/javascript'.Ex.error @ cdn.ampproject.org/v0/validator.js:330
    cdn.ampproject.org/v0/validator.js:330 https://artofheadshots.com/famous-portrait/amp/:407:2 The parent tag of tag 'script' is 'body', but it can only be 'head'.Ex.error @ cdn.ampproject.org/v0/validator.js:330
    cdn.ampproject.org/v0/validator.js:330 https://artofheadshots.com/famous-portrait/amp/:408:0 The attribute 'type' in tag 'script type=application/ld+json' is set to the invalid value 'text/javascript'.Ex.error @ cdn.ampproject.org/v0/validator.js:330
    cdn.ampproject.org/v0/validator.js:330 https://artofheadshots.com/famous-portrait/amp/:408:0 The parent tag of tag 'script' is 'body', but it can only be 'head'.Ex.error @ cdn.ampproject.org/v0/validator.js:330
    cdn.ampproject.org/v0/validator.js:330 https://artofheadshots.com/famous-portrait/amp/:409:0 The attribute 'type' in tag 'script type=application/ld+json' is set to the invalid value 'text/javascript'.Ex.error @ cdn.ampproject.org/v0/validator.js:330
    cdn.ampproject.org/v0/validator.js:330 https://artofheadshots.com/famous-portrait/amp/:409:0 The parent tag of tag 'script' is 'body', but it can only be 'head'.Ex.error @ cdn.ampproject.org/v0/validator.js:330

    https://wordpress.org/plugins/pagefrog/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author pagefrog

    (@pagefrog)

    Hi mlennie,

    AMP errors are most often caused by some of the plugins you’ve installed. Most older plugins are not AMP compatible, so you’ll get a lot of errors. For example, AMP doesn’t support javascript, so plugins that injects script tags will throw an error.

    If you update to the latest version of PageFrog, you’ll find a new feature called “Force AMP Compliance” which will disable conflicting plugins on AMP pages to avoid these errors. You’ll find this under Mobile Formats > Settings, it’s a checkbox near the bottom of the page.

    Let me know if that fixes your errors!

    Just tried the Force AMP compliance and it killed the AMP pages completely. No content, no results when post//amp/#development=1 is used in the Chrome developer tools console test.

    Dang. Any ideas on what to do here?

    Thanks for the plugin. This will change things.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.