google / site-kit-wp

Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
https://sitekit.withgoogle.com
Apache License 2.0
1.22k stars 278 forks source link

Conflict: fatal error displayed when trying to customize site page with Simple WordPress Membership plugin active #7351

Open adamdunnage opened 1 year ago

adamdunnage commented 1 year ago

Bug Description

A fatal error is displayed when trying to customize a site page as admin when both Site Kit and the Simple WordPress Membership plugin are active.

This has been reported in the support forum here and is reproducible on a test site as seen in the attached recording and screenshots below.

A recording of this happening can be seen here: https://www.loom.com/share/33e04f53c42246e1b9c58214f3b5b81a

The error is as follows:

Fatal error:  Uncaught Error: Call to undefined function Google\Site_Kit\Core\Util\get_plugin_data() in /s2-lastteam/wordpress/wp-content/plugins/google-site-kit/includes/Core/Util/Auto_Updates.php:103
Stack trace:
#0 /s2-lastteam/wordpress/wp-content/plugins/google-site-kit/includes/Core/Util/Auto_Updates.php(54): Google\Site_Kit\Core\Util\Auto_Updates::sitekit_forced_autoupdates_status()
#1 /s2-lastteam/wordpress/wp-content/plugins/google-site-kit/includes/Core/Authentication/Authentication.php(912): Google\Site_Kit\Core\Util\Auto_Updates::is_plugin_autoupdates_enabled()
#2 /s2-lastteam/wordpress/wp-content/plugins/google-site-kit/includes/Core/Util/Method_Proxy_Trait.php(25): Google\Site_Kit\Core\Authentication\Authentication->inline_js_base_data()
#3 /s2-lastteam/wordpress/wp-includes/class-wp-hook.php(308): Google\Site_Kit\Core\Authentication\Authentication->Google\Site_Kit\Core\Util\{closure}()
#4 /s2-lastteam/wordpress/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#5 /s2-lastteam/wordpress/wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php(737): apply_filters()
#6 /s2-lastteam/wordpress/wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php(355): Google\Site_Kit\Core\Assets\Assets->get_inline_base_data()
#7 [internal function]: Google\Site_Kit\Core\Assets\Assets->Google\Site_Kit\Core\Assets\{closure}()
#8 /s2-lastteam/wordpress/wp-content/plugins/google-site-kit/includes/Core/Assets/Script_Data.php(51): call_user_func()
#9 [internal function]: Google\Site_Kit\Core\Assets\Script_Data->Google\Site_Kit\Core\Assets\{closure}()
#10 /s2-lastteam/wordpress/wp-content/plugins/google-site-kit/includes/Core/Assets/Asset.php(129): call_user_func()
#11 /s2-lastteam/wordpress/wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php(1014): Google\Site_Kit\Core\Assets\Asset->before_print()
#12 /s2-lastteam/wordpress/wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php(1023): Google\Site_Kit\Core\Assets\Assets->run_before_print_callbacks()
#13 /s2-lastteam/wordpress/wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php(1023): Google\Site_Kit\Core\Assets\Assets->run_before_print_callbacks()
#14 /s2-lastteam/wordpress/wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php(1023): Google\Site_Kit\Core\Assets\Assets->run_before_print_callbacks()
#15 /s2-lastteam/wordpress/wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php(154): Google\Site_Kit\Core\Assets\Assets->run_before_print_callbacks()
#16 /s2-lastteam/wordpress/wp-includes/class-wp-hook.php(308): Google\Site_Kit\Core\Assets\Assets->Google\Site_Kit\Core\Assets\{closure}()
#17 /s2-lastteam/wordpress/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#18 /s2-lastteam/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action()
#19 /s2-lastteam/wordpress/wp-includes/script-loader.php(2146): do_action()
#20 /s2-lastteam/wordpress/wp-includes/class-wp-hook.php(308): wp_print_head_scripts()
#21 /s2-lastteam/wordpress/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#22 /s2-lastteam/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action()
#23 /s2-lastteam/wordpress/wp-includes/general-template.php(3049): do_action()
#24 /s2-lastteam/wordpress/wp-content/themes/twentytwenty/header.php(23): wp_head()
#25 /s2-lastteam/wordpress/wp-includes/template.php(783): require_once('/s2-lastteam/wo...')
#26 /s2-lastteam/wordpress/wp-includes/template.php(718): load_template()
#27 /s2-lastteam/wordpress/wp-includes/general-template.php(48): locate_template()
#28 /s2-lastteam/wordpress/wp-content/themes/twentytwenty/index.php(17): get_header()
#29 /s2-lastteam/wordpress/wp-includes/template-loader.php(106): include('/s2-lastteam/wo...')
#30 /s2-lastteam/wordpress/wp-blog-header.php(19): require_once('/s2-lastteam/wo...')
#31 /s2-lastteam/wordpress/index.php(17): require('/s2-lastteam/wo...')
#32 {main}
  thrown in /s2-lastteam/wordpress/wp-content/plugins/google-site-kit/includes/Core/Util/Auto_Updates.php on line 103

Steps to reproduce

  1. Install the Simple WordPress Membership plugin on a site with Site Kit already active and set up.
  2. Navigate to one of the sites pages while logged in as admin.
  3. Select the customize option.

Screenshots

image

Additional Context


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

Implementation Brief

Test Coverage

QA Brief

Changelog entry

mxbclang commented 9 months ago

Note: The 3 point estimate here is for initial investigation as part of escalation. When a solution is identified, this issue should move back to definition, ACs and IBs should be added, and estimate should be updated accordingly.