• Resolved strarsis

    (@strarsis)


    When setting up Google Site kit plugin (latest version (1.104.0)) on WordPress (latest version (6.2.2)), the setup fails after being redirected back from the initial OAuth screen. The following PHP Fatal error is logged:

    PHP message: PHP Fatal error:  Uncaught Exception: Missing site_id or site_code parameter for setup URL. in [...]/web/app/plugins/google-site-kit/includes/Core/Authentication/Google_Proxy.php:139
    Stack trace:
    #0 [...]/web/app/plugins/google-site-kit/includes/Core/Authentication/Setup.php(384): Google\Site_Kit\Core\Authentication\Google_Proxy->setup_url(Array)
    #1 [...]/web/app/plugins/google-site-kit/includes/Core/Authentication/Setup.php(295): Google\Site_Kit\Core\Authentication\Setup->redirect_to_proxy('sitekit-[redacted]...', Array)
    #2 [...]/web/wp/wp-includes/class-wp-hook.php(308): Google\Site_Kit\Core\Authentication\Setup->handle_action_exchange_site_code('')
    #3 [...]/web/wp/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(''" while reading response header from upstream, client: [redacted], server: www.example.com, request: "GET /wp/wp-admin/index.php?action=googlesitekit_proxy_exchange_site_code&googlesitekit_code=sitekit-[redacted]&googlesitekit_site_code=[redacted]&nonce=[redacted]&step=verification HTTP/2.0", upstream: "[...]", host: "www.example.com", referrer: "https://accounts.google.com/"

    This is the first time I encountered this issue, on all other sites the setup just worked fine.
    The only thing that I did was replacing some old development URLs to the correct production URLs – and they all look correct, the site works fine, no issues.

    How can I further diagnose this issue? Why is the required parameter (site_id / site_code) missing?

    • This topic was modified 1 year, 4 months ago by strarsis.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support James Osborne

    (@jamesosborne)

    Appreciate you opening a support topic @strarsis. As we are still investigating this error it would be great if you could share the following:

    1. Your Site Health information. You can use this form to share privately if preferred.??
    2. A recording of your set up experience from a Chrome browser incognito window. You can use a service such as Loom or RecordIt to share a screen recording, while using the same form to share this privately.?
    3. When you mention you changed some URLs, did you have Site Kit set up previously from another domain, or did you only attempt set up after changing the production URLs?

    Once we have the above I can discuss this with the team. Hopefully we can firstly get you connected and if required make changes to the plugin to ensure this no longer occurs.

    Plugin Support James Osborne

    (@jamesosborne)

    As we didn’t receive a response I’ll mark this as resolved. Feel free to open a new support topic if you continue to encounter issues, or reopen this topic and we’d be happy to assist.

    Plugin Support James Osborne

    (@jamesosborne)

    @strarsis Just following up here based on your GitHub comments. Can you share your Site Health information and I can check your current site setup?

    I can then provide you with details on how to ensure Site Kit captures new site records for your site, or advise you on any issues I may find. I suspect the error you’re facing is due to some changed from a previous setup.

    Thread Starter strarsis

    (@strarsis)

    @jamesosborne: I submitted the form. (Thank you for keeping the site name and domain private.)

    • This reply was modified 1 year, 1 month ago by strarsis.
    Plugin Support James Osborne

    (@jamesosborne)

    Thanks for sharing @strarsis. I reviewed your details and while nothing stands out with regards your plugin environment, what may have happened was Site Kit was registered on the same domain name but with some different records gathered for your site (WordPress files path, etc).

    To try and force Site Kit to gather details for your site, please perform the below:

    1. Visit your site settings (Settings > General).
    2. Change your site address (URL) and WordPress address (URL) from https://www.yoursite.com to https://yoursite.com (replacing the yoursite.com reference with your own site URL.
    3. Press the save button.
    4. Attempt Site Kit setup once more after logging back into your site.

    Let me know how you get on with the above, or share any errors you run into if any. If the same occurs, I’m happy to request a check of your site records.

    Note also that in relation to bedrock WordPress installations, or with a non standard folder structure, Site Kit does support such environments. Issues can arise in the event of a URL, ap-admin path, WordPress files location or other changes while the plugin remains connected.

    Let me know if you have any questions with the above.

    Plugin Support James Osborne

    (@jamesosborne)

    As we didn’t receive a response I’ll mark this as resolved. Feel free to open a new support topic if you continue to encounter issues, or reopen this topic and we’d be happy to assist.

    Thread Starter strarsis

    (@strarsis)

    @jamesosborne: Hi James, I followed the steps for forcing Site Kit to regather the site details, but the issue persisted:
    I changed the primary site domain, reset Site Kit and started the Site Kit setup process again, but the same error occurs.

    One thing comes to mind: Could it be that the particular Google account reached its limit for Google Analytics accounts? But would not this cause a specific error message during the setup?

    Plugin Support James Osborne

    (@jamesosborne)

    Thanks for the update @strarsis. So we can troubleshoot this further, can you share a recording of what you’re experiencing, with your developer tools tab open displaying any console errors? You can use a service such as Loom or RecordIt to share a screen recording, while using the same form previously used to share this privately.?

    Based on what I can see in the recording, we may need to perform a check of your site records on the service. Let me know if you have any questions with this.

    Plugin Support James Osborne

    (@jamesosborne)

    @strarsis As we didn’t get a response I’ll close this support topic. Note that I’m happy to request a check of your site records for any invalid callback references if you wish to share the above, or if the error remains.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘PHP Fatal error at initial setup: `Missing site_id or site_code parameter […]`’ is closed to new replies.