Title: AMP Validation Errors
Last modified: May 17, 2018

---

# AMP Validation Errors

 *  Resolved [olu92](https://wordpress.org/support/users/olu92/)
 * (@olu92)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/amp-validation-errors-5/)
 * Hello
 * I’m having a few validation issues on with AMP pages.
 * I’m receiving the following validation issues through GSC.
 * The mandatory tag ‘amphtml engine v0.js script’ is missing or incorrect.
    1 instance
 * The tag ‘amp-analytics’ requires including the ‘amp-analytics’ extension JavaScript.
   
   1 instance
 * The tag ‘amp-analytics extension .json script’ requires including the ‘amp-analytics’
   extension JavaScript.
    1 instance
 * The analytics tag has been set up through the analytics options through the plugins
   analytics option and was validated.
 * Here’s a page I was having an issue with [https://www.adestra.com/blog/12-second-rule/amp/](https://www.adestra.com/blog/12-second-rule/amp/)
 * Any help on the this would be appreciated
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Famp-validation-errors-5%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [danieledti](https://wordpress.org/support/users/danieledti/)
 * (@danieledti)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/amp-validation-errors-5/#post-10290972)
 * i have this problem too! =/
 *  [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/)
 * (@ryankienstra)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/amp-validation-errors-5/#post-10292757)
 * Hi [@olu92](https://wordpress.org/support/users/olu92/),
    Thanks for bringing
   this up. Are there any other plugins on the site related to AMP or analytics?
 * Something is injecting `<amp-analytics>` at the bottom of the document:
 * [⌊Amp analytics⌉⌊Amp analytics⌉[
    -  This reply was modified 7 years, 12 months ago by [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/).
 *  Thread Starter [olu92](https://wordpress.org/support/users/olu92/)
 * (@olu92)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/amp-validation-errors-5/#post-10295351)
 * Hi [@ryankienstra](https://wordpress.org/support/users/ryankienstra/)
 * Thanks for your quick response we are using the Glue for Yoast SEO & AMP plugin.
   But the analytics code has been set up through the AMP plugin rather than the
   Glue for Yoast SEO & AMP plugin.
 *  [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/)
 * (@ryankienstra)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/amp-validation-errors-5/#post-10296408)
 * Hi [@olu92](https://wordpress.org/support/users/olu92/),
    Thanks, you’re right
   that this plugin is outputting the `<amp-analytics>` tag at the bottom of the
   page. Sorry for missing that 🙂
 * I’m still looking at why the components scripts don’t appear.
 *  [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/)
 * (@ryankienstra)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/amp-validation-errors-5/#post-10297321)
 * Hi [@olu92](https://wordpress.org/support/users/olu92/),
    This may be related
   to the plugin Glue for Yoast SEO & AMP calling a recently-deprecated method:
 * [https://plugins.trac.wordpress.org/browser/glue-for-yoast-seo-amp/trunk/classes/class-sanitizer.php?rev=1631056#L23](https://plugins.trac.wordpress.org/browser/glue-for-yoast-seo-amp/trunk/classes/class-sanitizer.php?rev=1631056#L23)
 *     ```
       $body = $this->get_body_node();
       ```
   
 * This coming week, we’re deploying a version of the plugin that won’t raise an
   error when that method is called:
 * [https://github.com/Automattic/amp-wp/pull/1141](https://github.com/Automattic/amp-wp/pull/1141)
 * It’s hard to say if this will fix your issue, as I didn’t reproduce it exactly
   locally, though there were several AMP errors.
 * Could you please ping me (@ryankienstra) on this topic this coming week, after
   version `0.7.1` of this plugin is released?
    -  This reply was modified 7 years, 12 months ago by [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/).
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/amp-validation-errors-5/#post-10297482)
 * [@ryankienstra](https://wordpress.org/support/users/ryankienstra/) I don’t think
   the use of `get_body_node` would cause this problem because it was just deprecated
   not removed in 0.7.0.
 * The behavior seems similar to what was reported in regards to the Autoptimize
   plugin: [https://github.com/Automattic/amp-wp/issues/1159](https://github.com/Automattic/amp-wp/issues/1159)
 * But it doesn’t seem this plugin is installed on the site.
 * [@olu92](https://wordpress.org/support/users/olu92/) Do you have any optimizer
   plugins active?
 *  Thread Starter [olu92](https://wordpress.org/support/users/olu92/)
 * (@olu92)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/amp-validation-errors-5/#post-10302557)
 * Hi [@westonruter](https://wordpress.org/support/users/westonruter/),
 * There aren’t any optimizer plugins active on the site.
 *  [myhre5948](https://wordpress.org/support/users/myhre5948/)
 * (@myhre5948)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/amp-validation-errors-5/#post-10308702)
 * Hi,
    I keep getting this error on all my posts: Warning: There is content which
   fails AMP validation; it will be stripped when served as AMP , Invalid elements:
   script
 * I click on ‘debug’ and it takes me to AMP version of post. The only thing I see
   missing is my affiliate ads.
 * How can I fix this?
 * Thanks
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/amp-validation-errors-5/#post-10310085)
 * [@myhre5948](https://wordpress.org/support/users/myhre5948/) See [https://wordpress.org/support/topic/warning-there-is-content-which-fails-amp-validation-it-will-be-stripped-when-s/](https://wordpress.org/support/topic/warning-there-is-content-which-fails-amp-validation-it-will-be-stripped-when-s/)
 *  [myhre5948](https://wordpress.org/support/users/myhre5948/)
 * (@myhre5948)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/amp-validation-errors-5/#post-10310665)
 * Hi Weston,
 * Read that thread already. I don’t have 404 or 500 errors. Only my ads are being
   stripped.
 * Still did not see a solution except that there will be a fix released next week.
   Is that what you are referring to?
 * Thanks
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/amp-validation-errors-5/#post-10311195)
 * [@myhre5948](https://wordpress.org/support/users/myhre5948/) There is no error
   for you. There is only a warning. The warning is that ads are being stripped.
 *  Thread Starter [olu92](https://wordpress.org/support/users/olu92/)
 * (@olu92)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/amp-validation-errors-5/#post-10366607)
 * Hi [@ryankienstra](https://wordpress.org/support/users/ryankienstra/) did you
   find out why the analytics code may have been being injected at the bottom of
   the AMP pages? I’ve just updated to the latest version of the AMP plugin but 
   it doesn’t seem to have resolved the issue.
 *  [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/)
 * (@ryankienstra)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/amp-validation-errors-5/#post-10449141)
 * **Sorry For The Delay**
 * Hi [@olu92](https://wordpress.org/support/users/olu92/),
    Thanks for pinging 
   me like I asked, and sorry for the delay in getting back to you.
 * Are you still having any issues with AMP?
 * It looks like the page you linked to doesn’t have a validation error. Maybe you
   fixed it:
 * [https://www.adestra.com/blog/12-second-rule/amp/](https://www.adestra.com/blog/12-second-rule/amp/)
 * Great job on your AMP pages, the `<amp-social-share>` elements look really good.
    -  This reply was modified 7 years, 10 months ago by [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/).
    -  This reply was modified 7 years, 10 months ago by [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/).
    -  This reply was modified 7 years, 10 months ago by [Ryan Kienstra](https://wordpress.org/support/users/ryankienstra/).
 *  [pixelmm](https://wordpress.org/support/users/pixelmm/)
 * (@pixelmm)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/amp-validation-errors-5/#post-10500590)
 * I’ve AMP validation problem too on the page:[https://www.allenarsiadallenare.it/atteggiamento/diventa-un-allenatore-con-la-mentalita-vincente/amp/](https://www.allenarsiadallenare.it/atteggiamento/diventa-un-allenatore-con-la-mentalita-vincente/amp/)
 * Don’t know why s simple block of script, that manually is very easy to insert,
   cause that kind of problem 🙁
 * Thanks

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

The topic ‘AMP Validation Errors’ is closed to new replies.

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

 * 14 replies
 * 6 participants
 * Last reply from: [pixelmm](https://wordpress.org/support/users/pixelmm/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/amp-validation-errors-5/#post-10500590)
 * Status: resolved