Title: JS script errors
Last modified: August 27, 2020

---

# JS script errors

 *  Resolved [tvalleau](https://wordpress.org/support/users/tvalleau/)
 * (@tvalleau)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/js-script-errors/)
 * I’m getting this on a Woocommerce product: “There is content which fails AMP 
   validation. In order for AMP to be served you will have to remove the invalid
   markup or allow the plugin to remove it.”
 * Obviously, we’d like to be able to sell the product, and without the following
   5 scripts, we cannot. I have marked the code “Keep” but cannot tell if the notice
   when I do so (that AMP will be disabled) applies to just that product, or the
   entire site.
 * Have never seen this error before; just since updating to 2.0 this morning. Using
   Avada 7.
 * The errors:
 * Invalid elements: script (5)
    Affected: Woocommerce and Event Tickets (from the
   Events Calendar)
 * invalid script: jquery.js
    [https://(website)/wp-includes/js/jquery/jquery.js](https://(website)/wp-includes/js/jquery/jquery.js)
 * invalid script: underscore-before.js
    [https://(website)/wp-content/plugins/event-tickets/common/src/resources/js/underscore-before.js](https://(website)/wp-content/plugins/event-tickets/common/src/resources/js/underscore-before.js)
 * invalid script: underscore-after.js
    [https://(website)/wp-content/plugins/event-tickets/common/src/resources/js/underscore-after.js](https://(website)/wp-content/plugins/event-tickets/common/src/resources/js/underscore-after.js)
 * invalid script: underscore-min.js
    [https://(website)/wp-includes/js/underscore.min.js](https://(website)/wp-includes/js/underscore.min.js)
 * invalid script: wp-util.js
    [https://(website)/wp-includes/js/wp-util.js](https://(website)/wp-includes/js/wp-util.js)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fjs-script-errors%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/js-script-errors/#post-13324923)
 * The invalid markup that the AMP plugin previously was removing is now being shown
   as validation errors. Previously the validation errors were hidden from view.
   You’re now seeing that the AMP plugin has been removing these scripts all along.
   If the AMP pages are working fine, you can just mark each of the validation errors
   as “Reviewed” and you won’t get warned about them anymore.
 * WooCommerce is not yet AMP-compatible. If the product pages don’t work acceptable(
   via graceful degradation) when the scripts are removed, then you should disable
   the Product post type from being served as AMP. You can disable this in the Supported
   Templates section of the AMP settings screen. You’ll also probably want to disable
   AMP for the cart page. You can do this via the “AMP Enabled” toggle when editing
   the page.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/js-script-errors/#post-13324934)
 * Otherwise, if you don’t want to see the validation errors reported anymore, you
   can also go into your WordPress user profile settings and turn off Developer 
   Tools. Just be aware that the AMP plugin is still removing these AMP-invalid 
   scripts to make the pages valid AMP.
 *  Thread Starter [tvalleau](https://wordpress.org/support/users/tvalleau/)
 * (@tvalleau)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/js-script-errors/#post-13325070)
 * Thank you, Weston. Exactly the information I needed.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/js-script-errors/#post-13325461)
 * I’ve pinned a topic with more details: [https://wordpress.org/support/topic/why-you-are-now-seeing-amp-validation-errors-in-reader-mode-%e2%9a%a0%ef%b8%8f/](https://wordpress.org/support/topic/why-you-are-now-seeing-amp-validation-errors-in-reader-mode-%e2%9a%a0%ef%b8%8f/)

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

The topic ‘JS script 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/)

## Tags

 * [js](https://wordpress.org/support/topic-tag/js/)
 * [script](https://wordpress.org/support/topic-tag/script/)

 * 4 replies
 * 2 participants
 * Last reply from: [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/js-script-errors/#post-13325461)
 * Status: resolved