• Resolved Malcolm Peralty

    (@phoenixfireball)


    I get this notice in my logs.

    Undefined offset: 1 wp-content/plugins/google-site-kit/includes/Core/Authentication/Authentication.php:844

    Here’s the details from Query Monitor:

    wp-content/plugins/google-site-kit/includes/Core/Authentication/Authentication.php:844
    Google\S\C\A\Authentication->inline_js_base_data()
    wp-content/plugins/google-site-kit/includes/Core/Util/Method_Proxy_Trait.php:25
    Google\S\C\A\Authentication->Google\S\C\U\{closure}()
    wp-includes/class-wp-hook.php:307
    apply_filters('googlesitekit_inline_base_data')
    wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php:710
    Google\S\C\A\Assets->get_inline_base_data()
    wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php:348
    Google\S\C\A\Assets->Google\S\C\A\{closure}()
    Unknown location
    Google\S\C\A\Script_Data->Google\S\C\A\{closure}()
    Unknown location
    Google\S\C\A\Asset->before_print()
    wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php:903
    Google\S\C\A\Assets->run_before_print_callbacks()
    wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php:912
    Google\S\C\A\Assets->run_before_print_callbacks()
    wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php:159
    Google\S\C\A\Assets->Google\S\C\A\{closure}()
    wp-includes/class-wp-hook.php:307
    do_action('admin_print_scripts')
    wp-admin/admin-header.php:146
Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support James Osborne

    (@jamesosborne)

    Hi Malcolm,

    Thanks for reaching out, and sharing details of the error you’re encountering. So we can determine more on this can you share the following:

    1. Did you notice this when checking your logs or did you encounter any unusual behavior or errors when using or setting up Site Kit?
    2. Are you able to recreate this warning if you clear your logs and perform the same actions you did within Site Kit?
    3. Your Site Health information. You can use this form to share privately if preferred.

    Once we have the above I can check this with the team.

    Thread Starter Malcolm Peralty

    (@phoenixfireball)

    Hi James,

    1.) This error was copied from the WP Debug Log.
    2.) I don’t know the inciting action that makes this error appear.
    3.) I have submitted the form privately with the requested information.

    I should note that the database is separate from the server using DigitalOcean Droplet and hosted DB.

    Plugin Support James Osborne

    (@jamesosborne)

    Many thanks for sharing. While I can’t be sure of the cause at this point I don’t suspect a database server hosted elsewhere would be resulting in this warning. I’ll check this with the team and report back to you here.

    In the meantime while I’m checking this, if you encounter any warnings or errors within your wp-admin dashboard let me know. I’ll also review the contents of your provided Site Health information, thank you!

    Plugin Support James Osborne

    (@jamesosborne)

    Thanks for your patience on this. I’ve spoken with the team and it looks like the warning you’re encountering is due to your WordPress version being altered somehow. Site Kit looks for an existing version, which typically includes decimals (ie. 5.9.2).

    Are you familiar with how your current version has been modified somehow?

    Thread Starter Malcolm Peralty

    (@phoenixfireball)

    Yes, our host allows us to disable WP version as a simple security option so that bots can’t access the WordPress version and use that to determine what vulnerabilities to use to attack the site. It’s a small obfuscation option.

    Plugin Support James Osborne

    (@jamesosborne)

    Interesting. Many thanks for sharing. As it’s only a warning and not an error I suspect you can safely ignore this. I will however check this further with the team, and see would allowing version numbers without decimals be something that could be supported.

    I’ll also close this support topic now as for the moment you can ignore these warnings. If however you find something doesn’t work as it should based on the error you’re reporting let me know.

    I’ll also let you know once I have an update on the possibility of allowing for integer WordPress versions. Thank you for bringing this to our attention.

    Plugin Support James Osborne

    (@jamesosborne)

    Hi @phoenixfireball,

    Just to let you know I’ve created a GitHub issue based on your query. You’ll find more on this below:
    https://github.com/google/site-kit-wp/issues/4963

    Many again for sharing your findings on this!

    Thread Starter Malcolm Peralty

    (@phoenixfireball)

    Thank you!

    Plugin Support James Osborne

    (@jamesosborne)

    @phoenixfireball I’ve been trying to recreate the same console errors you’ve encounterd and so far I’ve been unable to do so, with the methods I’ve used to removing any decimals from a custom WordPress version not resulting in the same experience.

    So we can determine more on this can you share any additional details of the configuration at host level that you’ve applied to change your WordPress version? I’ve setup a site on DigitalOcean however I don’t see such an option.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Undefined offset: 1’ is closed to new replies.