Skip Navigation

Resolved

Reported for: WPML Multilingual CMS 4.6.4

Resolved in: WPML 4.6.5

Topic Tags: Compatibility

Overview of the issue

If you update your Site Kit by Google plugin to its latest version 1.106, you may find the following PHP error:

An error of type E_ERROR was caused in line 3937 of the file .../wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php. Error message: Uncaught TypeError: Illegal offset type in isset or empty in .../wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php:3937
Stack trace:
#0 .../wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-post-element.php(54): SitePress->is_display_as_translated_post_type(Object(WP_Error))
#1 .../wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/wpml-url-filters.class.php(445): WPML_Post_Element->is_display_as_translated()
#2 .../wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/wpml-url-filters.class.php(238): WPML_URL_Filters->is_display_as_translated_mode(Object(WPML_Post_Element))
#3 /wordpress/core/6.2.2/wp-includes/class-wp-hook.php(310): WPML_URL_Filters->permalink_filter('https://...', Object(WP_Post))
#4 /wordpress/core/6.2.2/wp-includes/plugin.php(205): WP_Hook->apply_filters('https://...', Array)
#5 /wordpress/core/6.2.2/wp-includes/link-template.php(371): apply_filters('post_type_link', 'https://...', Object(WP_Post), false, false)
#6 /wordpress/core/6.2.2/wp-includes/link-template.php(201): get_post_permalink(Object(WP_Post), false, false)
#7 .../wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php(1099): get_permalink(Object(WP_Post))
#8 .../wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php(728): Google\Site_Kit\Core\Assets\Assets->get_product_base_paths()
#9 .../wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php(357): Google\Site_Kit\Core\Assets\Assets->get_inline_base_data()
#10 [internal function]: Google\Site_Kit\Core\Assets\Assets->Google\Site_Kit\Core\Assets\{closure}('googlesitekit-b...')
#11 .../wp-content/plugins/google-site-kit/includes/Core/Assets/Script_Data.php(51): call_user_func(Object(Closure), 'googlesitekit-b...')
#12 [internal function]: Google\Site_Kit\Core\Assets\Script_Data->Google\Site_Kit\Core\Assets\{closure}('googlesitekit-b...')
#13 .../wp-content/plugins/google-site-kit/includes/Core/Assets/Asset.php(129): call_user_func(Object(Closure), 'googlesitekit-b...')
#14 .../wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php(1017): Google\Site_Kit\Core\Assets\Asset->before_print()
#15 .../wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php(1026): Google\Site_Kit\Core\Assets\Assets->run_before_print_callbacks(Object(WP_Scripts), Array)
#16 .../wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php(1026): Google\Site_Kit\Core\Assets\Assets->run_before_print_callbacks(Object(WP_Scripts), Array)
#17 .../wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php(1026): Google\Site_Kit\Core\Assets\Assets->run_before_print_callbacks(Object(WP_Scripts), Array)
#18 .../wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php(156): Google\Site_Kit\Core\Assets\Assets->run_before_print_callbacks(Object(WP_Scripts), Array)
#19 /wordpress/core/6.2.2/wp-includes/class-wp-hook.php(308): Google\Site_Kit\Core\Assets\Assets->Google\Site_Kit\Core\Assets\{closure}('')
#20 /wordpress/core/6.2.2/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
#21 /wordpress/core/6.2.2/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#22 /wordpress/core/6.2.2/wp-admin/admin-header.php(146): do_action('admin_print_scr...')
#23 /wordpress/core/6.2.2/wp-admin/index.php(137): require_once('/wordpress/core...')
#24 {main}
thrown

Workaround

Our developers are investigating this issue. In the meantime, please consider to downgrade to the previous Site Kit version (1.105).

 

8 Responses to “Site Kit by Google - Uncaught TypeError: Illegal offset type in isset or empty in....”

  1. Downgrading Google Site Kit seems to actually fix or mitigate this bug. In any case, it was possible to log in to the dashboard again and so far you can work there again – thank you very much!

  2. In my case, downgrading to earlier versions of Site Kit did not help: 104, 103, 102, 101, 99.
    The “ciritcal error” message only appeared on some pages in the backend. Navigating the main pages was okay, but editing a page or a blog post did not work. Disabling Site Kit or WPML helps.

    • Hello there,
      We just released WPML 4.6.5 that should solve this situation.
      Could you please make a full backup of your site first or directly test it in your staging site?
      Regards

  3. I have the same problem.
    I have WPML Multilingual CMS Version 4.6.4 installed but I can not see the new version update 4.6.5