• Resolved emachuca

    (@emachuca)


    I’m using Litespeed web server (community), with WordPress and Litespeed cache plugin. And Genesis framework with Genesis Sample child theme, which are both AMP compatible. All updated to the latest version as of today.

    Yet, if I try to validate my blog at https://search.google.com/test/amp, I get:

    Not a valid AMP page.
    Invalid AMP pages will not have AMP-specific features in Google search results.

    Custom JavaScript is not allowed. (3 errors):
    <script src=”data:text/javascript;base64, V2ViRm9udENvbmZpZ…
    <script id=”litespeed-webfont-lib” src=”https://te&#8230;
    <script src=”data:text/javascript;base64, IWZ1bmN0aW9uKGEpe

    The mandatory attribute ‘amp-custom’ is missing in tag ‘style amp-custom’.(1 error):
    <style id=”litespeed-optm-css-rules”>.has-text-align-center

    If I go to LiteSpeed Cache > Toolbox > Debug Settings and set Disable All Features to ON, I’m still getting the same validation errors.

    Must say that I have Cloudflare Development mode ON (to bypass cache).

    Even if I turn off “Load Google fonts asynchronously”, and clear LS Cache. Still getting the custom JS validation errors. Also, I’m not using Lazy loading of images via LS plugin.

    If I deactivate Jetpack plugin, then I get different errors, still related to Litespeed:

    Custom JavaScript is not allowed.
    1 instance
    Line 1:13665
    <script src=”data:text/javascript;base64, IWZ1bmN0aW9uKGEp

    The attribute ‘onload’ may not appear in tag ‘link rel=preload’.
    1 instance
    Line 1:12657
    <link data-asynced=”1″ as=”style” onload=”this.onload=null;

    The mandatory attribute ‘amp-custom’ is missing in tag ‘style amp-custom’.
    1 instance
    Line 1:219
    <style id=”litespeed-optm-css-rules”>.has-text-align-center{

    The parent tag of tag ‘link rel=stylesheet for fonts’ is ‘noscript’, but it can only be ‘head’.
    1 instance
    Line 1:12949
    <link crossorigin=”anonymous” rel=”stylesheet” id=”genesis-

    And if I disable the Litespeed caching pluging,still get the same error shown above (Cloudflare cache bypassed).

    Not sure how tightly integrated are the LS server and plugin, but they seem to be optimization errors (I’m not an expert).

    Thanks in advance for your help,

    Eduardo

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter emachuca

    (@emachuca)

    SOLVED

    After so much fiddling with the plugin options, I solved the AMP validation problem by turning off Load CSS Asynchronously in Page Optimization –> CSS Settings in LS Cache plugin.

    My blog nos shows Valid AMP page.

    Thread Starter emachuca

    (@emachuca)

    NOTE
    You also need to turn off Load Google Fonts Async in Page Optimization –> Optimization Settings in LS Cache plugin.

    Thus, turn off both Load CSS Asynchronously and Load Google Fonts Asynchronously for the page to validate on AMP.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Not a valid AMP page’ is closed to new replies.