AMP tag issue!
-
Hi,
I faced 2 issue on my website,
Error 1:
The tag 'head > style[amp-boilerplate]' is missing or incorrect, but required by 'noscript > style[amp-boilerplate]'.Error 2:
A mandatory AMP HTML tag is missing from this document.Please let me know what is the issue?
Thanks
-
You have to share the URL for your AMP page that has the problem.
Also, share the plugins you have active.
Hello! I have the same problems …
This is one of the pages where I have both errors: https://miguelrivasespana.es/hacerse-mediador-seguros/?amp
And these plugins that I have active:
– Yoast SEO.
– Yet Another Stars Rating.
– WP Super Cache.
– WP GDPR Compliance.
– Tidio Chat.
– SumoMe.
– Redirection.
– Really Simple SSL.
– Jetpack.
– Orbit Fox Companion.
– Gravity Forms.
– Elementor.
– Gravity Forms.
– Glue for Yoast SEO & AMP.
– Elementor.
– Easy Table of Contents.
– AMP.
– Antispam Bee.
– Autoptimize.
– BackWup.Thanks!
@elenmartinez Please try turning off Autoptimize. It may be conflicting. The issue is that the following
styleelement is getting stripped somehow:<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style>It is required for a page to be valid AMP. I can see that Autoptimize is moving it into a separate external stylesheet, in particular https://miguelrivasespana.es/wp-content/cache/autoptimize/css/autoptimize_5e2b569eacd096b6f7cad0fa561a0128.css
So that needs to be prevented. You may be able to do this yourself via the
autoptimize_filter_css_excludefilter. But in reality, Autoptimize CSS handling should be disabled entirely for AMP responses because the AMP plugin will automatically inline, minify, and tree-shake CSS. So it would perhaps be better to disable the Autoptimize plugin’s CSS optimizations entirely. For example, per the plugin docs:add_filter( 'autoptimize_css_do_minify', function( $minify ) { if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) { $minify = false; } return $minify; } );I’ll open an issue on the plugin so that AMP’s special stylesheets can be exempted handling.
I’ve filed the Autoptimize issue here: https://github.com/futtta/autoptimize/issues/222
Here’s a pull request you can try: https://github.com/futtta/autoptimize/pull/223
It should fix the issue, but I have not tested it myself.
Hi,
Hello! I have also faced same problems …
And I turn off the auto optimize plugin…
The issue with these websites all major pages: https://theproductanalyst.com
The plugin I have now installed?
- AMP
- Classic Editor
- Contact Form 7
- Google Analytics Dashboard for WP (GADWP)
- Insert Headers and Footers
- Monarch Plugin
- Shortcodes Ultimate
- Simple 301 Redirects
- Yoast SEO
The pull request for Autoptimize has been merged. So watch for a new version of that plugin and you can try re-activating it, or try applying the patch sooner.
I have this error A mandatory AMP HTML tag is missing from this document.
it shows this error in google search console how to fix this.
these are the urls effected
http://turpugodavarizilla.com/2019/01/10/ఆంతర్వేదిపాలెంలో-జిల్లా/?amp
18 Jan 2019
http://turpugodavarizilla.com/tourist-places/religious-tourism/vanapalli/?amp
18 Jan 2019
http://turpugodavarizilla.com/tourist-places/religious-tourism/ryali/?amp
18 Jan 2019
http://turpugodavarizilla.com/2019/01/09/2000-crores-to-smart-city-development/?amp
18 Jan 2019
http://turpugodavarizilla.com/2019/01/03/కుళ్లిన-సరుకులు/?amperror showing in google search console instance was
<amp-pixel src=”https://pixel.wp.com/g.gif?v=ext&j=1%3A6.9&blog=156126913&post=210&tz=5.5&srv=turpugodavarizilla.com&host=turpugodavarizilla.com&rand=RANDOM&ref=DOCUMENT_REFERRER”></amp-pixel></body></html> <—- the last symbol “>” was showing error in red.
-
This reply was modified 7 years, 2 months ago by
naveenrocks.
@naveenrocks Please open a new topic.
The topic ‘AMP tag issue!’ is closed to new replies.