Clicky

  1. Home
  2. Troubleshooting
  3. Case Study #1 – The Cloudflare & HTTPS problem

Case Study #1 – The Cloudflare & HTTPS problem

Question:

This owner is using Cloudflare to integrate https, but there is a setting that removes the ‘Protocol’ from the URL, which is not allowed in the AMP.

Here is the validation errors:

The attribute ‘src’ in tag ‘amp-sidebar extension .js script’ is set to the invalid value ‘//cdn.ampproject.org/v0/amp-sidebar-0.1.js’. CUSTOM_JAVASCRIPT_DISALLOWED
line 22, column 0

The attribute ‘src’ in tag ‘amp-user-notification extension .js script’ is set to the invalid value ‘//cdn.ampproject.org/v0/amp-user-notification-0.1.js’. CUSTOM_JAVASCRIPT_DISALLOWED
line 23, column 0

The attribute ‘src’ in tag ‘amp-ad extension .js script’ is set to the invalid value ‘//cdn.ampproject.org/v0/amp-ad-0.1.js’. CUSTOM_JAVASCRIPT_DISALLOWED
line 24, column 0

The attribute ‘src’ in tag ‘amp-analytics extension .js script’ is set to the invalid value ‘//cdn.ampproject.org/v0/amp-analytics-0.1.js’. CUSTOM_JAVASCRIPT_DISALLOWED
line 25, column 0

The tag ‘amp-analytics extension .js script’ is missing or incorrect, but required by ‘amp-analytics’. AMP_TAG_PROBLEM
line 201, column 7

The extension ‘amp-carousel extension .js script’ was found on this page, but is unused (no ‘amp-carousel’ tag seen). This may become an error in the future. DEPRECATION
line 201, column 7

The tag ‘amp-sidebar extension .js script’ is missing or incorrect, but required by ‘amp-sidebar’. AMP_TAG_PROBLEM
line 201, column 7

The tag ‘amp-analytics extension .js script’ is missing or incorrect, but required by ‘amp-user-notification’. AMP_TAG_PROBLEM
line 201, column 7

The tag ‘amp-user-notification extension .js script’ is missing or incorrect, but required by ‘amp-user-notification’. AMP_TAG_PROBLEM
line 201, column 7

Solution:

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.

Tutorial: Here is the tutorial on how to solve that: https://ampforwp.com/implement-amp-cloudflare/

Ask your Questions Directly!
If you can't find the solutions in this article, then just ask us in the comments and we will answer it for you!
Updated on September 16, 2017

    Are you still looking for a solution?

    Then fill out the below form and we will reach out to you within a few hours.

    Was this article helpful?

    Related Articles

    Leave a Comment