• Resolved malcolmmcfly

    (@malcolmmcfly)


    This quite strange. I installed a brand new version of WordPress and the first think I wanted to do was install SiteKit.

    From the start I get the following error:

    Your site may not be ready for Site Kit
    Site Kit cannot access the WordPress REST API. Please ensure it is enabled on your site.

    I have tried installing/reinstalling several times.

    In the site overview in the dashboard, I see:

    Data error in Search Console
    The response is not a valid json response

    Clicking any links SiteKit gives me the following error in the Chrome console:

    Google Site Kit API Error method:POST datapoint:activation type:core identifier:modules error:”The response is not a valid JSON response.”

    I have also tried resetting SiteKit several times, and the Site Health plugin is not giving me any clues.

    Any ideas what is going on?

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

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

    (@jamesosborne)

    Thanks for reaching out. From trying to access your public WordPress rest endpoints I encounter a GoDaddy notice regarding a firewall restriction.

    Have you made any changes to your hosting settings such as your security or Firewall configurations – other than the default settings?

    In addition to the above if you want to share your Site Health information via this form I’d be happy to check your environment.

    Plugin Support James Osborne

    (@jamesosborne)

    Just to keep you updated I’ve tested setting up Site Kit on a GoDaddy site and I’ve been unable to recreate the same experience. Feel free to share your Site Health information as requested above along with any configurations applied at host level and we’ll perform some additional checks.

    Where requested to share your hosting provider in the form feel free to include any specific hosting plan you’re on.

    Thread Starter malcolmmcfly

    (@malcolmmcfly)

    @jamesosborne just completed the Site Health Information survey as requested above.

    This is a new WordPress installation, we currently use Medium for blogging.

    I’ve always used GoDaddy’s Website Security feature on our website, so no new changes.

    Thread Starter malcolmmcfly

    (@malcolmmcfly)

    @jamesosborne additionally, I am using GoDaddy’s “Maximum Linux Hosting with cPanel”

    Thread Starter malcolmmcfly

    (@malcolmmcfly)

    @jamesosborne here is what I see when I am viewing the Site Overview from the WordPress dashboard: https://imgur.com/a/QJROYfp

    Plugin Support James Osborne

    (@jamesosborne)

    Many thanks for sharing the additional insights, very useful to see what’s occurring. I’ll add this information to the GitHub issue we have open which we’re currently investigating. As your specific issue seems slightly different it would be great if you could also share the below:

    1. The full details of the “Error caught while fetching” error message you encounter from the screenshot you kindly provided. To do so click on the arrow button next to “Object” so the full error details expand.
    2. Do you notice any REST API warnings or critical errors from your Site Health status (This isn’t output in your Site Health details)?

    Let me know if you have any questions with the above, and thanks again for sharing all these insights.

    Thread Starter malcolmmcfly

    (@malcolmmcfly)

    Here is a screenshot of there error: https://imgur.com/a/BLTs2QI , but the error code is not very helpful.

    
    {code: "invalid_json", message: "The response is not a valid JSON response."}
    

    And as far Site Health status, we have this: https://imgur.com/a/cfs3bUO

    Plugin Support James Osborne

    (@jamesosborne)

    Many thanks for sharing the additional information. It looks like it is a host level restriction or block resulting in this experience, in particular as there are no REST API warnings in your Site Health status.

    Do you have access to your ModSecurity hosting application from your control panel? Based on your previous comments it sounds like you may have, if it’s part of the “GoDaddy’s Website Security”. If so can you temporarily deactivate while trying once more?

    Thread Starter malcolmmcfly

    (@malcolmmcfly)

    @jamesosborne if I can install it with website security disabled, will it function properly once I re-enable website security after installation?

    Plugin Support James Osborne

    (@jamesosborne)

    Yes, Site Kit should function as expected after setting up the plugin. I don’t expect there would any any issues. Let me know how you get on after checking this. Please also connect the Analytics module if you’re planning on using on using Google Analytics for your site, before then reactivating ModSecurity.

    Let me know how you get on after attempting the above.

    Thread Starter malcolmmcfly

    (@malcolmmcfly)

    @jamesosborne I disabled GoDaddy Website Security. I then attempted to install SiteKit again. The problem remained unchanged as above.

    Plugin Support James Osborne

    (@jamesosborne)

    Thanks for the update. There is something at host level that remains active blocking Site Kit setup, you’ll see this below when accessing your REST endpoint:
    https://fareupthere.com/blog/?rest_route=/

    While I’m unsure whether this is related to an issue we’ve identified with ModSecurity during Analytics setup can you first of all check with your hosting provider and ensure that your WordPress REST endpoints are accessible?

    Thread Starter malcolmmcfly

    (@malcolmmcfly)

    I solved the issue by whitelisting my IP address in GoDaddy’s Website Security menu. I am not sure if this is a long term solution or not.

    Plugin Support James Osborne

    (@jamesosborne)

    Many thanks for providing an update, great to hear that worked for you.

    I’ll also keep this support topic open so we can inform you once we’ve made changes to the plugin in relation to possible triggers for hosts using ModSecurity, which has been impacting some users.

    Plugin Support James Osborne

    (@jamesosborne)

    Just to keep you updated we made changes to the plugin that ensures users are less likely to run into any REST related hosting blockers during Site Kit setup. You’ll find out more on this below:
    https://github.com/google/site-kit-wp/issues/3532

    Thanks for helping us to identify this.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Site Kit cannot access the WordPress REST API. Please ensure it is enabled …’ is closed to new replies.