Error on AMP sites only
-
Google has alerted me of the following pages on my site that are facing server errors:
– https://lifeofaworkingadult.com/2020/09/13/movie-review-tenet-2020/?amp
– https://lifeofaworkingadult.com/category/travels/malaysia/kedah/?amp
– https://lifeofaworkingadult.com/category/entertainment/dramas-tv-dramas/?amp
– https://lifeofaworkingadult.com/category/lifestyle/travels/malaysia/?ampUpon my checking it only affects the AMP version of the site. Is it an error from AMP plug-in?
The page I need help with: [log in to see the link]
-
Can you look at your PHP error log to find any errors located there? You can enable the error log as follows: https://ww.wp.xz.cn/support/article/debugging-in-wordpress/#wp_debug_log
You can provide this and your Site Health information privately here via our submission form: https://forms.gle/nZCN8stfVxfp1vin6
Apparently duplicate of https://ww.wp.xz.cn/support/topic/landing-page-has-become-white-after-update/
Sorry. This is not the same issue as the previous support topic I opened. Previously the landing page was accessible but just in white due to theme incompatibility.
The new issue I just opened just happened today when Google Search Console alerted me of several pages from my site crawled today having an internal server error and is completely inaccessible, and it’s only affecting the AMP version of the sites. I’ll get the error log and provide you the information in a bit.
I have submitted the requested to the link provided.
Thanks!
Thank you. I see what appears to be the relevant error:
PHP Fatal error: Uncaught Error: Class ‘Composer\Autoload\ComposerStaticInit8b9bf7226e6b67e213fc141a441d71b6’ not found in …/amp/vendor/composer/autoload_real.php:33
That’s strange. It seems like maybe there was a problem when upgrading. I don’t see
ComposerStaticInit8b9bf7226e6b67e213fc141a441d71b6in neither v2.1.0 nor v2.1.1:https://plugins.trac.ww.wp.xz.cn/browser/amp/tags/2.1.0/vendor/composer/autoload_real.php#L33
https://plugins.trac.ww.wp.xz.cn/browser/amp/tags/2.1.1/vendor/composer/autoload_real.php#L33But I do see it in v2.0.11:
https://plugins.trac.ww.wp.xz.cn/browser/amp/tags/2.0.11/vendor/composer/autoload_real.php#L33
So seems like there was perhaps a problem during the installation. Try re-installing 2.1.1. You can download the latest stable ZIP from the plugin directory page: https://ww.wp.xz.cn/plugins/amp/
Then you can re-install by going to Plugins > Add New, Upload Plugin, select the
amp.zip, and then install and confirm.I’ve deleted and re-installed the plugin, but the specific pages are still showing that error.
Are there new fatal errors appearing in the error log?
Nope. Just the same still shown.
I wonder if the PHP opcache needs to be flushed on your server. This has been a source of such errors in the past for plugin updates generally. I thought the last WP version flushed the opcache automatically upon plugin updates, but maybe not.
-
This reply was modified 5 years, 1 month ago by
Weston Ruter.
Well, I contacted my hosting provider, and they did some checks from their end as well as clearing the cache on the server’s end, but still, it did not solve the issue. Any other ideas?
Are you sure they they cleared the PHP opcache and not the page cache?
The only other thing I can think of is that if your site splits up PHP processing onto multiple application servers, potentially the filesystem got out of sync across them?
Are you still getting a fatal error related to
ComposerStaticInit8b9bf7226e6b67e213fc141a441d71b6not being found? That is only in 2.0.11 in/vendor/composer/autoload_static.php: https://plugins.trac.ww.wp.xz.cn/browser/amp/tags/2.0.11/vendor/composer/autoload_static.php#L33So if you’re getting an error in
/vendor/composer/autoload_real.phpabout that class not existing, then it seems that you have updated/vendor/composer/autoload_static.phpbut have not updated/vendor/composer/autoload_real.php. The best explanation I have is the PHP opcache being stale.I haven’t used this plugin before, but there is a WP OPCache plugin that allows you to flush the opcache in WordPress.
I see. My apologies, I cannot clear (of which my hosting provider clarified) the PHP OPCache as I’m on a shared plan. However, they have agreed to investigate further at the server level. I will update here accordingly.
At the mean time, I’m finding more and more older posts that are showing the 500 Internal Server Error, and category pages as well. This issue did not occur in the older version of the plugin though.
Are there new PHP fatal errors being added to the log which are the same as the
ComposerStaticInit8b9bf7226e6b67e213fc141a441d71b6error?You might also want to manually check the source code for
vendor/composer/autoload_static.phpandvendor/composer/autoload_real.phpon your server, that the same ComposerStatic class name is referenced in each.You can see from the v2.1.1 release on ww.wp.xz.cn, it should be
ComposerStaticInite6709b1d44e0d31d2dd2d31a66c72b89:https://plugins.trac.ww.wp.xz.cn/browser/amp/tags/2.1.1/vendor/composer/autoload_static.php#L7
https://plugins.trac.ww.wp.xz.cn/browser/amp/tags/2.1.1/vendor/composer/autoload_real.php#L35There have been no new errors logged in the error log since I last provided to you.
I have manually checked the source code for both, and it’s the same as the link you provided (as per v2.1.1 release).
I thought changing the permalinks of the posts affected might solve the issue, but nope, still showing the same error.
-
This reply was modified 5 years, 1 month ago by
The topic ‘Error on AMP sites only’ is closed to new replies.