Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    You are getting those validation errors because the theme and/or plugins on your site are not apparently AMP-compatible.

    The AMP plugin removes markup that does not confirm to its specification, and that includes CSS that goes above the 50KB limit (after the plugin tries to minify it) and any custom JS scripts. Removal of JS can still result in an acceptable AMP experience as long as the theme/plugins are designed to gracefully degrade when JS is turned off in the browser. So it’s up to you to look at the site in AMP and decide whether the removal of the invalid markup is acceptable. If not, then you have three options:

    1. Switch to AMP-compatible theme/plugins.
    2. Create a child theme and/or custom plugins which prevent the output of invalid markup in favor of adding AMP components. As an example of this, see this child theme of Noto Simple which adds AMP-compatibility. See developer documentation.
    3. Lastly, switch to Reader mode. This will result in AMP pages that do not look the same as the rest of your site, but you shouldn’t have to do any work to make it compatible.

    The ecosystem of AMP-compatible themes and plugins is growing but it is still relatively small. So unless you are a developer, switching to Reader mode will likely be the best option for you unless you are able to switch theme/plugins.

    Thread Starter chitrag135

    (@chitrag135)

    As I noticed my theme is not supporting AMP how can use this plugin

    Plugin Author Weston Ruter

    (@westonruter)

    You can use Reader mode, if you want to use the Website experience.

    Or if you don’t want to AMP for your Website, you can just enable the Stories experience. This is independent of your theme.

    Hello,
    My site health is ‘good’ with only one recommendation for improvement, unrelated to AMP.

    I started fooling around with AMP several weeks ago. I had several errors, but they all could be removed without consequence. However, I decided to switch themes from one that was not listed on the ‘ecosystem’ (https://amp-wp.org/ecosystem/) – to one that was on the list. Right after the theme switch, I got a new message:

    URL validation failed to due to the absence of the expected JSON-containing AMP_VALIDATION HTML comment after </body>. This is often due to a PHP fatal error occurring. Please check your server PHP error logs; to do this you may need to enable WP_DEBUG_LOG. If you are stuck, please search the support forum for possible related topics, or otherwise start a new support topic including the error message, the URL to your site, and your active theme/plugins. Please include your Site Health Info.

    My active theme is Zakra. I switched from OceanWP.

    Active plugins:
    AMP
    Accelerated Mobile Pages (Addon mode)
    Site Kit by Google
    Akismet
    Share Buttons by AddThis
    Jetpack by WordPress
    MC4WP: Mailchimp for WordPress
    Rank Math SEO
    Smush
    Ultimate Blocks
    Updraft Plus

    *I disabled W3 Total Cache based on older support forum threads, but I don’t think that’s the problem.

    Then again, I don’t know what I’m doing. I read the php debug stuff and I started to get a headache.

    Thanks for any help/guidance you can give.
    Regards,
    Ellen

    Hello all recently all posts in my website are not showing properly and errors are showing for every post with this message and my website vigilant360.in and here is google search result link https://www.google.com/amp/s/vigilant360.in/%3famp
    There is content which fails AMP validation. Nevertheless, the invalid markup has been automatically removed. Review issues

    Invalid elements: script (26)

    Invalid attributes: onfocus, onblur, onclick (5)
    Please help me with this

    @chakravarthi334 @ellen413 Can you create a new support topic and we can assist from there?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘URL validated and several errors’ is closed to new replies.