{"id":7550,"date":"2017-01-02T02:31:55","date_gmt":"2017-01-02T08:31:55","guid":{"rendered":"https:\/\/krisbunda.com\/blog\/?p=7550"},"modified":"2017-04-15T09:06:55","modified_gmt":"2017-04-15T14:06:55","slug":"google-search-console-amp-error-fix-in-wordpress","status":"publish","type":"post","link":"https:\/\/krisbunda.com\/blog\/2017\/01\/02\/google-search-console-amp-error-fix-in-wordpress\/","title":{"rendered":"Google Search Console: Fix AMP Error in WordPress"},"content":{"rendered":"<h3>I received an email from Google Search Console<\/h3>\n<p>&#8230;about my <abbr title=\"Accelerated Mobile Pages\">AMP<\/abbr> pages having errors.<\/p>\n<p>Although there are other issues at hand, like conflicts between other AMP plugins and the <a href=\"https:\/\/wordpress.org\/plugins\/amp\/\" target=\"_blank\">Automattic (WP&#8217;s founding father&#8217;s corporation) AMP plugin<\/a>.<\/p>\n<p>I wanted to inject ads into my AMP pages, but it seems a plugin that does it reliably without breaking other features (like images or galleries)\u00a0isn&#8217;t more than half-baked yet. (If you know of a good AMP ad injector for <abbr title=\"Word Press\">WP<\/abbr>, please comment).<\/p>\n<figure id=\"attachment_7554\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 600px\"><a href=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-Accelerated-Mobile-Pages-Critical-Errors-List.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7554\" src=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-Accelerated-Mobile-Pages-Critical-Errors-List-600x463.png\" alt=\"GOOGLE SEARCH CONSOLE - Accelerated Mobile Pages Critical Errors List\" width=\"600\" height=\"463\" srcset=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-Accelerated-Mobile-Pages-Critical-Errors-List-600x463.png 600w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-Accelerated-Mobile-Pages-Critical-Errors-List-150x116.png 150w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-Accelerated-Mobile-Pages-Critical-Errors-List-30x23.png 30w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-Accelerated-Mobile-Pages-Critical-Errors-List-180x139.png 180w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-Accelerated-Mobile-Pages-Critical-Errors-List-300x231.png 300w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-Accelerated-Mobile-Pages-Critical-Errors-List.png 902w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><figcaption class=\"caption wp-caption-text\">GOOGLE SEARCH CONSOLE &#8211; Accelerated Mobile Pages Critical Errors List<\/figcaption><\/figure>\n<p>I found if I just disable the plugin that injects AMP ads, the styling and Google Search Console errors evaporated.<\/p>\n<h4>But then of course I don&#8217;t have my ads in AMP pages&#8230;<\/h4>\n<p>For now, I&#8217;ll just forego, because with errors, Google won&#8217;t list your pages in their ever-so-precious AMP search results. It&#8217;s strange that the world&#8217;s largest seller of internet ads (which makes up the vast majority of their revenue), makes it so difficult to insert their ads in their shiny new schema.<\/p>\n<figure id=\"attachment_7555\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 600px\"><a href=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Pages-with-Critical-Error-Issues-list.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7555\" src=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Pages-with-Critical-Error-Issues-list-600x638.png\" alt=\"GOOGLE SEARCH CONSOLE - AMP Pages with Critical Error Issues (list)\" width=\"600\" height=\"638\" srcset=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Pages-with-Critical-Error-Issues-list-600x638.png 600w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Pages-with-Critical-Error-Issues-list-141x150.png 141w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Pages-with-Critical-Error-Issues-list-28x30.png 28w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Pages-with-Critical-Error-Issues-list-169x180.png 169w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Pages-with-Critical-Error-Issues-list-282x300.png 282w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Pages-with-Critical-Error-Issues-list-564x600.png 564w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Pages-with-Critical-Error-Issues-list.png 884w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><figcaption class=\"caption wp-caption-text\">GOOGLE SEARCH CONSOLE &#8211; AMP Pages with Critical Error Issues (list)<\/figcaption><\/figure>\n<figure id=\"attachment_7557\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 600px\"><a href=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-markup-missing-or-incorrect-CDATA-boilerplate.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7557\" src=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-markup-missing-or-incorrect-CDATA-boilerplate-600x634.png\" alt=\"GOOGLE SEARCH CONSOLE - AMP markup missing or incorrect CDATA boilerplate\" width=\"600\" height=\"634\" srcset=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-markup-missing-or-incorrect-CDATA-boilerplate-600x634.png 600w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-markup-missing-or-incorrect-CDATA-boilerplate-142x150.png 142w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-markup-missing-or-incorrect-CDATA-boilerplate-28x30.png 28w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-markup-missing-or-incorrect-CDATA-boilerplate-170x180.png 170w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-markup-missing-or-incorrect-CDATA-boilerplate-284x300.png 284w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-markup-missing-or-incorrect-CDATA-boilerplate-568x600.png 568w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-markup-missing-or-incorrect-CDATA-boilerplate.png 878w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><figcaption class=\"caption wp-caption-text\">GOOGLE SEARCH CONSOLE &#8211; AMP markup missing or incorrect CDATA boilerplate<\/figcaption><\/figure>\n<figure id=\"attachment_7556\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 600px\"><a href=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Page-with-Not-Valid-Structured-Data.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7556\" src=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Page-with-Not-Valid-Structured-Data-600x590.png\" alt=\"GOOGLE SEARCH CONSOLE - AMP Page with Not Valid Structured Data\" width=\"600\" height=\"590\" srcset=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Page-with-Not-Valid-Structured-Data-600x590.png 600w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Page-with-Not-Valid-Structured-Data-150x147.png 150w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Page-with-Not-Valid-Structured-Data-30x30.png 30w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Page-with-Not-Valid-Structured-Data-180x177.png 180w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Page-with-Not-Valid-Structured-Data-300x295.png 300w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Page-with-Not-Valid-Structured-Data.png 946w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><figcaption class=\"caption wp-caption-text\">GOOGLE SEARCH CONSOLE &#8211; AMP Page with Not Valid Structured Data<\/figcaption><\/figure>\n<h4>But if you can get your myriad AMP plugins to play nice enough together, yet still have AMP markup errors:<\/h4>\n<p>Here&#8217;s something I\u00a0got what seemed to be a cache plugin minification error to stop adding a space (or whatever) to the AMP markup, even if it didn&#8217;t help the issue of breaking my galleries:<\/p>\n<ul>\n<li>Go to your cache plugin,<\/li>\n<li>Make it NOT cache or minify AMP pages by having it exclude any URL with &#8220;amp\/&#8221; in it.<\/li>\n<li>Then save your rule, reset all your caches, wait a few minutes, test your AMP pages again to see if it helped.<\/li>\n<\/ul>\n<figure id=\"attachment_7553\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 600px\"><a href=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Errors-From-Cache-Plugins-minification.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7553\" src=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Errors-From-Cache-Plugins-minification-600x651.png\" alt=\"GOOGLE SEARCH CONSOLE - AMP Errors - From Cache Plugin's minification\" width=\"600\" height=\"651\" srcset=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Errors-From-Cache-Plugins-minification-600x651.png 600w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Errors-From-Cache-Plugins-minification-138x150.png 138w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Errors-From-Cache-Plugins-minification-28x30.png 28w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Errors-From-Cache-Plugins-minification-166x180.png 166w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Errors-From-Cache-Plugins-minification-276x300.png 276w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Errors-From-Cache-Plugins-minification-553x600.png 553w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Errors-From-Cache-Plugins-minification.png 794w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><figcaption class=\"caption wp-caption-text\">GOOGLE SEARCH CONSOLE &#8211; AMP Errors &#8211; From Cache Plugin&#8217;s minification<\/figcaption><\/figure>\n<figure id=\"attachment_7552\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 600px\"><a href=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Page-now-with-Valid-Structured-Data.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-7552\" src=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Page-now-with-Valid-Structured-Data-600x594.png\" alt=\"GOOGLE SEARCH CONSOLE - AMP Page now with Valid Structured Data\" width=\"600\" height=\"594\" srcset=\"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Page-now-with-Valid-Structured-Data-600x594.png 600w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Page-now-with-Valid-Structured-Data-150x148.png 150w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Page-now-with-Valid-Structured-Data-30x30.png 30w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Page-now-with-Valid-Structured-Data-180x178.png 180w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Page-now-with-Valid-Structured-Data-300x297.png 300w, https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Page-now-with-Valid-Structured-Data.png 944w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><figcaption class=\"caption wp-caption-text\">GOOGLE SEARCH CONSOLE &#8211; AMP Page now with Valid Structured Data<\/figcaption><\/figure>\n<h4>If you&#8217;re paying attention<\/h4>\n<p>You&#8217;ll notice the first screenshots reference an issue with IMG tags, the second screenshot references issues with the STYLE tag. The point is, it seems when AMP markup was broken, removing AMP pages from the\u00a0cache plugin&#8217;s effects seemed to fix the markup error. Hopefully it&#8217;s a fix\u00a0for the reason you&#8217;re here.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Your cache plugin may be injecting the odd space into your AMP markup during minification. <\/p>\n","protected":false},"author":1,"featured_media":7551,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":0,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","inline_featured_image":false,"kt_blocks_editor_width":"","_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4],"tags":[609,302,77,177,105],"class_list":["post-7550","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-designer","tag-amp","tag-blog","tag-google","tag-instructions","tag-web-design"],"aioseo_notices":[],"jetpack_publicize_connections":[],"taxonomy_info":{"category":[{"value":4,"label":"Designer"}],"post_tag":[{"value":609,"label":"AMP"},{"value":302,"label":"blog"},{"value":77,"label":"Google"},{"value":177,"label":"instructions"},{"value":105,"label":"web design"}]},"featured_image_src_large":["https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Error-Validation-Email.png",502,616,false],"author_info":{"display_name":"Kris Bunda","author_link":"https:\/\/krisbunda.com\/blog\/author\/kris-bunda\/"},"comment_info":4,"category_info":[{"term_id":4,"name":"Designer","slug":"designer","term_group":0,"term_taxonomy_id":4,"taxonomy":"category","description":"Posts focusing on web, graphic, CAD, and other design.","parent":0,"count":91,"filter":"raw","cat_ID":4,"category_count":91,"category_description":"Posts focusing on web, graphic, CAD, and other design.","cat_name":"Designer","category_nicename":"designer","category_parent":0}],"tag_info":[{"term_id":609,"name":"AMP","slug":"amp","term_group":0,"term_taxonomy_id":613,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":302,"name":"blog","slug":"blog","term_group":0,"term_taxonomy_id":302,"taxonomy":"post_tag","description":"","parent":0,"count":3,"filter":"raw"},{"term_id":77,"name":"Google","slug":"google","term_group":0,"term_taxonomy_id":77,"taxonomy":"post_tag","description":"","parent":0,"count":6,"filter":"raw"},{"term_id":177,"name":"instructions","slug":"instructions","term_group":0,"term_taxonomy_id":177,"taxonomy":"post_tag","description":"","parent":0,"count":28,"filter":"raw"},{"term_id":105,"name":"web design","slug":"web-design","term_group":0,"term_taxonomy_id":105,"taxonomy":"post_tag","description":"","parent":0,"count":19,"filter":"raw"}],"jetpack_featured_media_url":"https:\/\/krisbunda.com\/blog\/wp-content\/uploads\/2017\/01\/GOOGLE-SEARCH-CONSOLE-AMP-Error-Validation-Email.png","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p1NcZe-1XM","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/posts\/7550","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/comments?post=7550"}],"version-history":[{"count":0,"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/posts\/7550\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/media\/7551"}],"wp:attachment":[{"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/media?parent=7550"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/categories?post=7550"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/krisbunda.com\/blog\/wp-json\/wp\/v2\/tags?post=7550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}