{"id":24,"date":"2017-03-07T08:43:17","date_gmt":"2017-03-07T08:43:17","guid":{"rendered":"https:\/\/ampforwp.com\/tutorials\/?p=24"},"modified":"2017-09-16T09:18:51","modified_gmt":"2017-09-16T09:18:51","slug":"case-study-1-the-cloudflare-https-problem","status":"publish","type":"ht_kb","link":"https:\/\/ampforwp.com\/tutorials\/article\/case-study-1-the-cloudflare-https-problem\/","title":{"rendered":"Case Study #1  &#8211; The Cloudflare &#038; HTTPS problem"},"content":{"rendered":"<p><strong>Question:<\/strong><\/p>\n<p>This owner is using Cloudflare to integrate https, but there is a setting that removes the &#8216;Protocol&#8217; from the URL, which is not allowed in the AMP.<\/p>\n<p><strong>Here is the validation errors:<\/strong><\/p>\n<blockquote><p>The attribute &#8216;src&#8217; in tag &#8216;amp-sidebar extension .js script&#8217; is set to the invalid value &#8216;\/\/cdn.ampproject.org\/v0\/amp-sidebar-0.1.js&#8217;. CUSTOM_JAVASCRIPT_DISALLOWED<br \/>\nline 22, column 0<\/p>\n<p>The attribute &#8216;src&#8217; in tag &#8216;amp-user-notification extension .js script&#8217; is set to the invalid value &#8216;\/\/cdn.ampproject.org\/v0\/amp-user-notification-0.1.js&#8217;. CUSTOM_JAVASCRIPT_DISALLOWED<br \/>\nline 23, column 0<\/p>\n<p>The attribute &#8216;src&#8217; in tag &#8216;amp-ad extension .js script&#8217; is set to the invalid value &#8216;\/\/cdn.ampproject.org\/v0\/amp-ad-0.1.js&#8217;. CUSTOM_JAVASCRIPT_DISALLOWED<br \/>\nline 24, column 0<\/p>\n<p>The attribute &#8216;src&#8217; in tag &#8216;amp-analytics extension .js script&#8217; is set to the invalid value &#8216;\/\/cdn.ampproject.org\/v0\/amp-analytics-0.1.js&#8217;. CUSTOM_JAVASCRIPT_DISALLOWED<br \/>\nline 25, column 0<\/p>\n<p>The tag &#8216;amp-analytics extension .js script&#8217; is missing or incorrect, but required by &#8216;amp-analytics&#8217;. AMP_TAG_PROBLEM<br \/>\nline 201, column 7<\/p>\n<p>The extension &#8216;amp-carousel extension .js script&#8217; was found on this page, but is unused (no &#8216;amp-carousel&#8217; tag seen). This may become an error in the future. DEPRECATION<br \/>\nline 201, column 7<\/p>\n<p>The tag &#8216;amp-sidebar extension .js script&#8217; is missing or incorrect, but required by &#8216;amp-sidebar&#8217;. AMP_TAG_PROBLEM<br \/>\nline 201, column 7<\/p>\n<p>The tag &#8216;amp-analytics extension .js script&#8217; is missing or incorrect, but required by &#8216;amp-user-notification&#8217;. AMP_TAG_PROBLEM<br \/>\nline 201, column 7<\/p>\n<p>The tag &#8216;amp-user-notification extension .js script&#8217; is missing or incorrect, but required by &#8216;amp-user-notification&#8217;. AMP_TAG_PROBLEM<br \/>\nline 201, column 7<\/p><\/blockquote>\n<p><strong>Solution:<\/strong><\/p>\n<p>Actually, the validation errors that you are facing is neither coming from our plugin, nor from the 3rd party plugins. You are using Cloudflare to setup https and you have chosen a setting which automatically removes the Protocol part of the URL which is not allowed.<\/p>\n<p><strong>Tutorial:<\/strong> Here is the tutorial on how to solve that: <a href=\"https:\/\/ampforwp.com\/implement-amp-cloudflare\/\" rel=\"nofollow\">https:\/\/ampforwp.com\/implement-amp-cloudflare\/<\/a><\/p>\n<div id=\"div-1\" class=\"hkb-feedback\">\n\t\t\t<strong class=\"ht-mobile-exit__title\">Ask your Questions Directly!<\/strong><br>\n\t\t\t<div class=\"hkb_widget_exit__content\" style=\"font-size: 14px;\">If you can't find the solutions in this article, then just ask us in the comments and we will answer it for you!<\/div>\n\t\t\t<a href=\"https:\/\/ampforwp.com\/support\/#contact\" id=\"button\" target=\"_blank\" rel=\"noopener noreferrer\"><button>Yes, I have a Question<\/button><\/a>\n\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>Question: This owner is using Cloudflare to integrate https, but there is a setting that removes the &#8216;Protocol&#8217; from the URL, which is not allowed in the AMP. Here is the validation errors: The attribute &#8216;src&#8217; in tag &#8216;amp-sidebar extension .js script&#8217; is set to the invalid value &#8216;\/\/cdn.ampproject.org\/v0\/amp-sidebar-0.1.js&#8217;. CUSTOM_JAVASCRIPT_DISALLOWED&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"open","ping_status":"open","template":"","format":"standard","meta":[],"ht-kb-category":[5],"ht-kb-tag":[7],"_links":{"self":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/24"}],"collection":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/comments?post=24"}],"version-history":[{"count":2,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/24\/revisions"}],"predecessor-version":[{"id":26,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb\/24\/revisions\/26"}],"wp:attachment":[{"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/media?parent=24"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb-category?post=24"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/ampforwp.com\/tutorials\/wp-json\/wp\/v2\/ht-kb-tag?post=24"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}