• I got 3 errors through AMP validation extension which are listed below:

    1. The tag ‘script’ is disallowed except in specific forms. CUSTOM_JAVASCRIPT_DISALLOWED
    line 8, column 0

    2. The mandatory text (CDATA) inside tag ‘head > style[amp-boilerplate]’ is missing or incorrect. MANDATORY_AMP_TAG_MISSING_OR_INCORRECT
    line 9, column 0

    3. The mandatory tag ‘amphtml engine v0.js script’ is missing or incorrect. MANDATORY_AMP_TAG_MISSING_OR_INCORRECT
    line 106, column 96

    Could any one please tell me how to rectify these errors for my website?

    (Consider me as a new)

    Thanks

    https://www.ads-software.com/plugins/amp/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Disable any plugin like caching or CDN which minify the amp endpoint. Disable any plugin adding javascript to the amp page.

    See the ‘page source’ of your AMP endpoint (e.g., post-name/amp ) to SEE what is actually there as good starting point.

    Thread Starter rahulmishra85

    (@rahulmishra85)

    Thanks for your reply. I will do it.

    I also want to know, is there any way to check and verify Google AMP Analytic Code, whether it is working or not??

    I have a similar problem. The tag i have in page is:

    <script src=”//cdn.ampproject.org/v0.js” async></script>

    The “https:” is gone, but i can’t identify the cause. I’m using some plugin like “Force HTTPS” but i’m using SAGE Framework too and i think it’s related to it.

    However, the easier solution will be a str_replace() of the whole HTML code, or just the one related to the head… is there a way to do that?

    Thanks.

    @jureboga
    you likely want to start your own support topic. Note that if your site is properly setup for https, then the AMP plugin will set the link with https; if it can’t figure it out then it falls back to let the cdn determine the statu.

    On my site, properly configured as https

    <script src="https://cdn.ampproject.org/v0.js" async></script>

    You need to set the https setting in your wp-config.php file if not set properly elsewhere, to show your domain URL explicitly as https. If your site is setup properly for https with a 301 redirect for non-https requests you have no need to “force https” otherwise.

    Thread Starter rahulmishra85

    (@rahulmishra85)

    On my site, it is also properly configured as https

    <script src=”https://cdn.ampproject.org/v0.js&#8221; async></script>

    Thank you @neotrope, i found the solution.

    I removed Force HTTPS and configured WP: the problem was still there.

    So i cloned the site and started to disable a plugin at time.

    I found that the official CloudFlare plugin has a “HTTPS Protocol Rewriting: On” option that caused the problem. Switching to “Off” was the solution.

    Thanks again.

    How did you guys determine when an AMP problem is fixed? Is there an AMP test you can submit a page to?

    I have 22 pages generating AMP errors and right now all I know to do to test if some action fixes the issue is to make the change, delete the error message, and check for error messages in a day or two.

    How do I speed up the process?

    Test your page with the developer tools in chrome, and perhaps resubmit your sitemap to force the pages to be re-read once fixed. ??

    Thread Starter rahulmishra85

    (@rahulmishra85)

    Need help………

    Is it right Google Analytic code for AMP or I am missing anything here?

    <amp-analytics type=”googleanalytics” id=”Account Name “>
    <script type=”application/json”>
    {
    “vars”: {
    “account”: “UA-12345678-9”
    },
    “triggers”: {
    “trackPageviewWithAmpdocUrl”: {
    “on”: “visible”,
    “request”: “pageview”,
    “vars”: {
    “title”: “Write Page title here”,
    “ampdocUrl”: “write page url here”
    }
    }
    }
    </script>
    </amp-analytics>

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘AMP Validation Errors’ is closed to new replies.