• Resolved dfender

    (@dfender)


    Hi:

    I moved my website from a managed hosting provider to a VPS. On my old host, SiteKit was working just fine. After I transferred, I got the "Site Kit cannot access the WordPress REST API. Please ensure it is enabled on your site." error. And then when I connected to my Google account it shows "Data Error in Search Console" messages.

    The only changes I made to my site files was to delete inactive plugins and update to the latest versions on the active ones. When I tried WordPress troubleshooting mode, SiteKit did connect properly - a weird thing kept happening as I enabled each plugin, I kept getting an error message that it crashed my site. I selected the "force anyway" option to keep going - and did this to all the plugins and SiteKit kept connecting properly with all plugins active in Troubleshooting mode. As soon as I turned Troubleshooting mode off, SiteKit didn't connect properly anymore.

    I temporarily disabled my Firewall and that didn't fix the problem. I tried opening the page in an Incognito window and that didn't fix the problem. I've searched a bunch of these similar issues on the forum and I haven't found one that seems to come up with an answer that would fix my particular situation. Maybe it's something in my WordFence settings, but I have tried temporarily deactivating it as well at that didn't work.

    I'm guessing the problem is most likely due to my server configuration (Apache), but I don't know enough about those settings to know where to go look. Any advice or help to point me in the right direction would be most welcome.

    I have the site health info ready to upload to review.

    Thanks in advance!

    ~David

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support James Osborne

    (@jamesosborne)

    Thanks for reaching out @dfender. And I suspect you’re correct, this error may be related to a server configuration on your new host. To determine more on this, please share the following:

    1. Your Site Health information. You can use this form to share privately if preferred.??
    2. Do you see any warnings or errors when checking your Site Health status? (Tools > Site Health > Status), which differs from your Site Health information requested above? Such errors may include REST endpoint references.

    Note also that from the checks I performed on your (http), I can see the insecure version is accessible, while it’s also accessible over https. This could be impacting how Site Kit is connecting with your site. Once we have the above we can advise on this further. We also have a guide on the plugin website in relation to this error, which you may have already viewed.

    Thread Starter dfender

    (@dfender)

    Thanks for the reply. I submitted the site health info. There are no errors showing up in the status related to Rest endpoints (just one about object caching that I’m also working on and another about plugins not being compliant with the Consent API)

    I will over the link that you provided in a little bit when have a minute to check on that error and let you know if that makes any difference.

    Thread Starter dfender

    (@dfender)

    After reading the link you mentioned above – I did find that page before and it wasn’t able to help.

    I’m not sure what you mean by the insecure version is still accessible. I have my settings set to force and direct to secure content. Unless:

    1) I ran my site through Whynopadlock and it says “You have an invalid or missing intermediate (bundle) certificate. This may not break your padlock on all browsers, but will on others. Please contact your SSL Vendor for assistance with this error.” I’m not sure why that is, so I’m looking into that.

    2) In the meantime, I notice that my httpd.conf file has a VirtualHost entry to http on port 80 as well as the https on port 443. Should I remove that entry?

    Thread Starter dfender

    (@dfender)

    Another update:
    1) I found out that the cache on my browser was making me think I was being redirected to https, but the settings I thought I had set didn’t actually get written into my .htaccess file. So, I think I fixed that problem and everything really is being redirected now. Does that correct the insecure version you mentioned above?

    2) I also fixed the intermediate certificate issue with my SSL. Why No Padlock? shows everything is good now.

    BUT – neither of those fixes has corrected my original problem of SiteKit not accessing the REST API. So the mystery continues

    ~David

    Thread Starter dfender

    (@dfender)

    I opened up the developer tools in Chrome and get this error message when trying to connect to Site Kit:

    googlesitekit-api-81eec639102e319fbfee.js:1 Google Site Kit API Error method:GET datapoint:health-checks type:core identifier:site error:”The response is not a valid JSON response.”

    Thread Starter dfender

    (@dfender)

    Ok, I think I figured it out:

    This morning, after searching in vain through all the logs and server settings I could find for any hint of a clue of something to try, I decided to try running the WordPress troubleshooting mode again since I fixed the .htaccess rewrite/redirect issue and the issue with the SSL intermediate server certificate yesterday.

    Once again, in Troubleshooting mode, Site Kite connected without errors.

    But, as I started re-enabling the other plugins this time, I did NOT get the same server crashing errors that I encountered the other day (or any other errors on the plugins screen).

    And, unlike the other day, I did find one plugin, an embedded video player, that tripped Site Kit into producing the REST API error. After checking the rest of the plugins, I exited Troubleshooting mode, deactivated the video player plugin and now Site Kit works like it’s supposed to.

    I’m not sure why that plugin didn’t cause a conflict on my old host, but did on my new one. I moved hosts because I could get the most recent MySQL and such that my old host wasn’t providing, so perhaps something about the new versions of that stuff broke the old plugin.

    Anyway, I appreciate your help – it did help me stumble into finding a solution. Thanks!

    Plugin Support James Osborne

    (@jamesosborne)

    Thanks for the updates, and appreciate you sharing your findings over the weekend. Security certificate related issues are not uncommon, and in some cases changes are make to users .htaccess files which can result in errors similar to that which you encountered.

    If you encounter any further errors, do check for hints using the Site Health status tab as you did, while it can also be useful to perform some checks using the Health Check & Troubleshooting plugin to troubleshoot potential plugin conflicts or to extend your site health checks with a file integrity check and more. For htaccess specific issues, revisiting your permalink settings (Settings > Permalink) can also refresh this file for you.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.