Support » Plugin: AMP » Error when validating

  • Resolved Raul Craveiro

    (@craveiroraul)


    I’m getting an error when I try to validate my pages:

    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.

    I’ve checked my Site Health and It’s not showing any error.

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

    (@westonruter)

    Hello. This has come up before:

    https://github.com/ampproject/amp-wp/issues/3887
    https://github.com/ampproject/amp-wp/issues/1733

    We have what should be an ultimate fix merged: https://github.com/ampproject/amp-wp/pull/3898

    This will be part of the v1.5 release at the end of this month. We’re currently working on publishing a 1.5-RC1 pre-release by the end of this week. I’ll make 1.5-alpha build for you to test as well in the next couple hours.

    Thread Starter Raul Craveiro

    (@craveiroraul)

    Okay, I can help testing 🙂

    Plugin Author Weston Ruter

    (@westonruter)

    Thread Starter Raul Craveiro

    (@craveiroraul)

    I just tested the plugin and got a similar error:

    URL validation failed due to the AMP validation request not returning JSON data. This may be 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.

    Plugin Author Weston Ruter

    (@westonruter)

    Ok thanks. Can you please check your error logs then?

    Thread Starter Raul Craveiro

    (@craveiroraul)

    The debug log is this:

    [21-Mar-2020 19:11:05 UTC] PHP Deprecated:  idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated in /home1/cravei83/public_html/wp-content/plugins/amp-1/includes/class-amp-http.php on line 233
    [21-Mar-2020 19:11:09 UTC] PHP Deprecated:  idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated in /home1/cravei83/public_html/wp-content/plugins/amp-1/includes/class-amp-http.php on line 233
    [21-Mar-2020 19:11:09 UTC] PHP Deprecated:  idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated in /home1/cravei83/public_html/wp-content/plugins/amp-1/includes/class-amp-http.php on line 233
    [21-Mar-2020 19:11:20 UTC] PHP Deprecated:  idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated in /home1/cravei83/public_html/wp-content/plugins/amp-1/includes/class-amp-http.php on line 233
    [21-Mar-2020 19:11:35 UTC] PHP Deprecated:  idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated in /home1/cravei83/public_html/wp-content/plugins/amp-1/includes/class-amp-http.php on line 233
    [21-Mar-2020 19:11:43 UTC] PHP Deprecated:  idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated in /home1/cravei83/public_html/wp-content/plugins/amp-1/includes/class-amp-http.php on line 233
    [21-Mar-2020 19:12:07 UTC] PHP Deprecated:  idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated in /home1/cravei83/public_html/wp-content/plugins/amp-1/includes/class-amp-http.php on line 233
    [21-Mar-2020 19:12:23 UTC] PHP Deprecated:  idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated in /home1/cravei83/public_html/wp-content/plugins/amp-1/includes/class-amp-http.php on line 233
    [21-Mar-2020 19:13:18 UTC] PHP Deprecated:  idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated in /home1/cravei83/public_html/wp-content/plugins/amp-1/includes/class-amp-http.php on line 233
    [21-Mar-2020 19:13:33 UTC] PHP Deprecated:  idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated in /home1/cravei83/public_html/wp-content/plugins/amp-1/includes/class-amp-http.php on line 233
    Plugin Author Weston Ruter

    (@westonruter)

    Hummm. Well, there aren’t any errors there. Those warnings are a separate issue.

    What plugins do you have active?

    Thread Starter Raul Craveiro

    (@craveiroraul)

    Autoptimize, Contact Form 7, EWWW Image Optimizer, Ezoic Integration, Yoast SEO, Glue for Yoast SEO & AMP, Redirection, WP Super Cache and the AMP plugin.

    Plugin Author Weston Ruter

    (@westonruter)

    Ok, could you please try deactivating Autoptimize and retrying to validate?

    Thread Starter Raul Craveiro

    (@craveiroraul)

    Got the same error.

    But I deactivated the Ezoic Integration plugin and It worked.

    Plugin Author Weston Ruter

    (@westonruter)

    I suggest opening a support topic on the Ezoic Integration support forum.There’s some compatibility problem, most likely due to an output buffering conflict. I can see they are starting output buffering extremely early, at plugins_loaded action. The AMP plugin starts buffering at the template_redirect action (see source) which we’ve determined is the earliest that this should be done. I’m happy to help them troubleshoot. Then again, I’m not familiar with Ezoic, so it may be that their service is fundamentally not AMP-compatible in the first place (e.g. needing to inject custom scripts into the page which aren’t AMP-compatible).

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Error when validating’ is closed to new replies.