Hello @guidestofixit
Thank you for reaching out to us, Yes AMP is a web component framework and for performance reasons it does not allow custom JavaScript.
The AMP plugin simply blocks custom JavaScript being loaded by other plugins to create an AMP valid page. However, there might some custom JavaScript being added post AMP page processing which is creating the validation error.
I was able to find the custom JavaScript mentioned below that is being added, but I am not sure which plugin or theme is adding it.
<script type="text/javascript">fetch(window.location.href,{method:"GET",headers:{"ts-request-embed-key":"91a1ab32-4dfa-47f4-a18d-a5962be1927e:4904e65b12e443b15ecaa65167c9178b94a2d7ac3ed22c40c3e142640d2907fa"}});</script>
I will recommend self debugging using Site health and troubleshooting plugin using the following steps.
- Install and activate the Health Check & Troubleshooting plugin.
- Navigate to Tools > Site Health > Troubleshooting.
- Enable troubleshooting mode
- Visit Appearance-> Themes -> Activate Your theme
- Visit Plugins-> Installed plugins -> Activate AMP plugin
- Visit plugin -> installed plugins and activate one of the plugins (only one at a time) which was active on your site
- Check AMP Page version of your page which caused the issue
- Do you found that issue?
- if yes, then you found culprit report back to us, or check that plugin settings
- if not, continue from step 6
We hope this helps!
i remove my cache plugin and replaced with w3 cache. Was able to set up the amp plugin again there wasn’t any issue. Can you confirm if it’s fixed from your end?
Hello @guidestofixit
I am afraid the validation error is still not fixed, we are still seeing the validation error, it might be something else, adding custom JavaScript.
For future references, you can self test your website on the AMP test
We hope this helps!
i keep getting this error as my main site just encountered this error in search console :fifty7tech.com what’s causing this errors?
Hello @guidestofixit
We are unsure of what could have caused the error. I request you to follow health check and troubleshooting, or please check with a WordPress expert who can better assist you by debugging it.
@guidestofixit As we didn’t receive a response I’ll mark this as resolved. Feel free to open a new support topic if you require any further assistance.