Hello! Can you share the Site Health info as well?
It appears you may be using an HTML optimization plugin that is interfering with the validation process.
Also, I see you are using AMP plugin v1.4.4. If you update to the latest version, v1.5.2, this issue may go away.
Also, I only see “PHP Notice” entries in the error log you screenshotted. Are there not any PHP fatal errors elsewhere in the log?
Hi @westonruter,
Thanks for your quick response.
1. here is my site health info: https://prnt.sc/rtrxfn, https://prnt.sc/rts89g
2. After updating AMP plugin to latest version, images on my site not loading (including site logo). you can check screenshot here: https://prnt.sc/rtruz5. Now i m switching back to old version..
3. you can also check my complete error log here: https://www.writeurl.com/text/p702wf7tdne02gotrm1w/ozwoo9dxhrmlwo4ezlkf
I bet you are experiencing this issue in regards to images missing: https://github.com/ampproject/amp-wp/issues/4491
I see you are using W3 Total Cache which has a known conflict here.
Please try deactivating W3 Total Cache. That may fix the ability to validate pages and it should also allow you to upgrade to AMP 1.5.2.
You could re-activate W3 Total Cache if you also disable the AMP Optimizer which is referenced in the above issue.
I have deactivated W3 Total Cache and updated AMP to V1.5.2. It resolved the Image issue.
But still i cant able to validate URLs. https://prnt.sc/rtswpa, https://prnt.sc/rtsx5k
OK, thanks for the update.
That’s strange that you’re still experiencing that issue. I want to help you determine what is going on, because others may experience it as well.
Do you have access to WP-CLI? Are you able to do validation via the command line by running: wp amp validation check-url /
?
Actually, can you connect with me on the WordPress.org Slack? This would probably work out better if we could chat instead of doing back-and-forth here, in this case. I’ll then summarize the resolution in the support topic for others to benefit.
The error message you are seeing is coming from here: https://github.com/ampproject/amp-wp/blob/1d641245c5e14af980596c4da1c2a4c0863fb4ee/includes/validation/class-amp-validation-manager.php#L2236-L2244
For some reason the validation request is returning with a 500 error code, but without adding anything to the error log. So I’m confused.
I’m not entirely sure why, but your site is setting a 500 status code during validation requests. Regardless of this, I realized that the AMP plugin needs to be setting a 200 status to override whatever status code was being set on the site for the validation response. For example, there needs to be a way to validate AMP issues for the 404 template.
I’ve filed an issue for this: https://github.com/ampproject/amp-wp/issues/4532
Fix opened here: https://github.com/ampproject/amp-wp/pull/4533
This will be part of the next release.
Another issue is that a PHP fatal error appears to be happening during validation requests only. In particular, the Widget Options plugin is causing this issue which is described here: https://wordpress.org/support/topic/standard-template-mode-internal-error/#post-12547136
This issue was reported upstream to the Widget Options plugin here: https://wordpress.org/support/topic/php-recoverable-fatal-error-when-switching-amp-mode/
@westonruter
Now everything works fine..
Thanks for your Support π
Pull request opened to make sure that these fatal errors get reported to the user when validating a URL: https://github.com/ampproject/amp-wp/pull/4542