Title: Error when validating
Last modified: March 18, 2020

---

# Error when validating

 *  Resolved [Raul Craveiro](https://wordpress.org/support/users/craveiroraul/)
 * (@craveiroraul)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/error-when-validating-2/)
 * 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](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/error-when-validating-2/#post-12558137)
 * Hello. This has come up before:
 * [https://github.com/ampproject/amp-wp/issues/3887](https://github.com/ampproject/amp-wp/issues/3887)
   
   [https://github.com/ampproject/amp-wp/issues/1733](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](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](https://wordpress.org/support/users/craveiroraul/)
 * (@craveiroraul)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/error-when-validating-2/#post-12558141)
 * Okay, I can help testing 🙂
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/error-when-validating-2/#post-12558437)
 * [@craveiroraul](https://wordpress.org/support/users/craveiroraul/) Could you 
   please test the build linked here: [https://github.com/ampproject/amp-wp/pull/4404#issuecomment-600834352](https://github.com/ampproject/amp-wp/pull/4404#issuecomment-600834352)
 *  Thread Starter [Raul Craveiro](https://wordpress.org/support/users/craveiroraul/)
 * (@craveiroraul)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/error-when-validating-2/#post-12562091)
 * 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.`
    -  This reply was modified 6 years, 2 months ago by [Raul Craveiro](https://wordpress.org/support/users/craveiroraul/).
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/error-when-validating-2/#post-12562256)
 * Ok thanks. Can you please check your error logs then?
 *  Thread Starter [Raul Craveiro](https://wordpress.org/support/users/craveiroraul/)
 * (@craveiroraul)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/error-when-validating-2/#post-12568938)
 * 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](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/error-when-validating-2/#post-12569093)
 * Hummm. Well, there aren’t any errors there. Those warnings are a separate issue.
 * What plugins do you have active?
 *  Thread Starter [Raul Craveiro](https://wordpress.org/support/users/craveiroraul/)
 * (@craveiroraul)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/error-when-validating-2/#post-12569630)
 * 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](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/error-when-validating-2/#post-12569646)
 * Ok, could you please try deactivating Autoptimize and retrying to validate?
 *  Thread Starter [Raul Craveiro](https://wordpress.org/support/users/craveiroraul/)
 * (@craveiroraul)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/error-when-validating-2/#post-12569648)
 * Got the same error.
 * But I deactivated the Ezoic Integration plugin and It worked.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/error-when-validating-2/#post-12595722)
 * I suggest opening a support topic on the Ezoic Integration [support forum](https://wordpress.org/support/plugin/ezoic-integration/).
   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](https://github.com/ampproject/amp-wp/blob/1094ea03bd5dc92889405a47a8c41de1a88908de/includes/class-amp-theme-support.php#L1091-L1096))
   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.

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

## Tags

 * [validation](https://wordpress.org/support/topic-tag/validation/)

 * 11 replies
 * 2 participants
 * Last reply from: [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/error-when-validating-2/#post-12595722)
 * Status: resolved