Posted: June 17, 2020 at 8:41 am
When the Event Espresso plugin is activated on https://accidentalgods.life, the SITE HEALTH panel in the WordPress dashboard shows this Critical Error: “The REST API is one way WordPress, and other applications, communicate with the server. One example is the block editor screen, which relies on this to display, and save, your posts and pages. The REST API request failed due to an error. Can you tell me what I can do to fix this please? Many thanks Faith |
|
Hi there, That’s a hosting related problem. May I ask who your web host is? Here’s some information about the error from Godaddy: |
|
Thanks Seth. That’s really interesting. I talked at length with my host – WP Engine – before posting though, and they said it’s a plugin issue. And when I deactivate the plugin all is well. |
|
I just spoke to WP Engine at length. They have checked all the things you suggest in the info you sent. Php version is latest. Memory limit 256M. Curling not an issue on the WP Engine platform. Neither are loopback requests or security modules. Please can you advise as I am really at a loss now. |
|
That’s strange. Can you please ask WP Engine to double-check that cURL is enabled on your server? |
|
They did check that already! |
|
This page – https://wpengine.com/support/platform-settings/ – shows cURL support is installed. See the Miscellaneous Modules section about half way down. |
|
Is it possible to temporarily deactivate all other plugins to see if the issue still exists? If it goes away, try enabling each deactivated plugin one-by-one to see if the error reappears. |
|
Hi there, Are you still getting this error? The check mentioned above basically loads up this: https://accidentalgods.life/wp-json/wp/v2/types/post/ And confirms that it actually loads. On your site, it loads for me. However, during the health check tests, it is either not loading or taking more than 10 seconds to load. I can see that you still have Event Espresso activated so just want to confirm you still get the error before moving forward. |
|
Hi Tony, I still have EE loaded on the live site because we have an open enrolment going on and apart from the Site Health warning about the critical issue, we’re not seeing any problems. The guys at WP Engine said that we should resolve it in case we see a major crash. So that’s what I’m trying to do. I already deactivated all the plugins and tested everything – that’s the first thing I did. I only write to you for support once I’ve tried all the obvious things. So yes – the issue is still there- the same “REST API encountered an error” message that will go away only when EE is deactivated. I don’t really understand what you mean about the check above – is the link you sent what it’s supposed to load (all looks like meaningless something or other to me!). Is the issue that it is just taking too long to load that? If so, why would that be the case? I’ve pushed the site to a staging version and have deactivated EE on there. The error message disappears. (It does add one about Yoast, but that’s because the license for that only works on the live site – so you can ignore that) |
|
Yes, and the point is that it does load. That link is what the above ‘critical’ test is run on and according to that it is not loading on your site. The test times out after 10 seconds, so when that test is run either the page is taking a while to load, or failing to load completely. Now, viewing the link directly in a browser is not exactly the same test as site info runs an authenticated request rather than just what we see, but again, it loads.
We don’t have enough information to answer those yet. The cURL request testing the above is set to timeout within 10 seconds, so either the page is taking more than that to load, or it’s crashing completely and cURL is closing the connection. Why either of those would happen we can’t say from the details posted.
Sure, I’ll take a look at staging if you can create a user. You can send the details over using this form: https://eventespresso.com/send-login-details/ Note, if you can also provide FTP access to the staging site I can add some debug code to staging to see if it sheds some more light on the issue, without FTP access we won’t add any code to the site, including additional plugins. (We’ve seen enabling additional plugins cause the site to whitescreen/fatal error if say enabling said pluign takes the site over its max available memory limit, without FTP access we then cant fix it and it simply looks like we broke the site. So as a rule, we require FTP access to do anything other than browse)
Whilst I can understand this, a couple of our test sites run on WPEngine and we don’t have any issues there. So although the test passes when EE is de-activated this may in fact just be another symptom of the cause. |
|
Setting up User and SFTP now. What email address shall I use for you? |
|
This reply has been marked as private. | |
Ok, so I spent a lot of time digging into this and I can’t see any difference between the request when processed with EE working on my sites, to the requests on yours. The strange part is that if I copy the exact code that is used in the site health section and run it elsewhere on your site it processes just fine. So the REST API is working on your site, just that request fails in site health. Unfortunately, I can’t tell you why the above request fails, everything looks correct from within EE and I went through and littered EE with log calls to confirm. |
|
Can’t thank you enough for doing all this. You’ve gone above and beyond on this one! It sounds like this is an issue with Site Health. And it’s not causing any issues elsewhere on the site (yet) so from all that you’ve said, I feel okay to ignore it. Thank you again. I’ll be continuing to recommend EE to clients. |
|
You’re most welcome. Just to note, we don’t keep credentials for longer than necessary so the ones you have submitted have now been deleted, just a reminder to also remove those server-side. |
|
The support post ‘WordPress SITE HEALTH CRITICAL error when EE plugin is activated’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.