Support » Plugin: AMP for WordPress » AMP Errors: 3 separate ones

  • Resolved kobe_2104

    (@kobe_2104)



    Hi Weston,

    Happy to create a new ticket but I’m getting the same as above and it is failing the validator.

    1. “The attribute ‘src’ in tag ‘amp-analytics extension .js script’ is set to the invalid value ‘https://cdn.ampproject.org/v0/amp-analytics-0.1.js’ defer=’defer’.”
    2. Only AMP runtime ‘script’ tags are allowed, and only in the document head.
    3. The mandatory tag ‘amphtml engine v0.js script’ is missing or incorrect.

    I’ve disabled W3 Caching, Speed Booster Pack, Yoast for AMP Glue. Don’t know what other plugins could be causing it. Could MonsterInsights be doing it? Doubt it considering I’ve disabled that too.

    Any help would be appreciated!

    One of all the pages with errors is:
    https://lavorwash.com.au/product/taurus/amp/

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

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

    (@westonruter)

    @kobe_2104 All three of those errors are being caused by the code ' defer='defer being injected into the script URLs. If it isn’t a plugin doing this, it could be PageSpeed that is doing it at the web server level: https://www.modpagespeed.com/doc/filter-js-defer

    Weston,
    I think I screwed up here a bit. It was indeed Speed Booster Pack. There is an option under General Options to “Exclude Scripts from Deferring”. Added amp-alalytics-0.1.js and v0.js to the list and before you know it, works a treat!
    Thanks for your help, sometimes good to bounce things off someone to get your brain to click into gear!
    Best Regards,
    Matt

    I’m late to this party but thanks for the tip.

    We had the exact same issue and it turned out the theme (which we inherited from the client’s previous developer) had a function that was automatically adding deferral to all .js files. The solution was to add a condition to exclude v0.js and now it’s working perfectly.

    I share this information in case it’s useful to someone else.

    the5krunner

    (@the5krunner)

    amp-alalytics-0.1.js and v0.js

    or

    amp-analytics-0.1.js and v0.js

    ?

    @the5krunner I honestly can’t remember now. Try removing the defer from the script tag and see what happens.

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