Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Moneytizer plugin results in dashboard error with v1.3.0 #3144

Closed
bethanylang opened this issue Apr 14, 2021 · 7 comments
Closed

The Moneytizer plugin results in dashboard error with v1.3.0 #3144

bethanylang opened this issue Apr 14, 2021 · 7 comments
Labels
Type: Bug Something isn't working Type: Support Support request

Comments

@bethanylang
Copy link
Collaborator

Bug Description

Two users in the support forum (here and here) reported still receiving the Cannot read property 'ea' of undefined error (#3132) that resulted from the Google Charts API update earlier this week even after updating Site Kit to v1.3.0. This error occurred when going to Site Kit > Dashboard.

Ultimately both users discovered that deactivating The Moneytizer plugin fixed the issue. One user reported that they had had The Moneytizer plugin installed since June 2020 without issue until updating to v.1.3.0, so it appears that this conflict may have been introduced in our most recent release.

Steps to reproduce

  1. Use the Site Kit testing plugin set to v1.2.9
  2. Install and activate The Moneytizer plugin
  3. Go to Site Kit > Dashboard and confirm that dashboard displays successfully
  4. Change Site Kit testing plugin to v1.3.0
  5. Go to Site Kit > Dashboard and error message will display:
Cannot read property 'ea' of undefined

    in GoogleChartV2
    in div
    in Sparkline
    in div
    in div
    in DataBlock
    in div
    in LegacySearchConsoleDashboardWidgetTopLevel
    in withData(LegacySearchConsoleDashboardWidgetTopLevel)
    in Unknown
    in WithSelect(withData(LegacySearchConsoleDashboardWidgetTopLevel))
    in FilteredComponent
    in FilteredComponent
    in WithFilters(LegacyDashboardSearchFunnelInner)
    in div
    in div
    in div
    in Layout
    in div
    in LegacyDashboardSearchFunnel
    in FilteredComponent
    in FilteredComponent
    in FilteredComponent
    in WithFilters(LegacyDashboardModule)
    in div
    in Row
    in div
    in Grid
    in div
    in DashboardApp
    in GoogleSitekitDashboard
    in RestoreSnapshots
    in ErrorHandler
    in Root

Additional Context

  • PHP Version: v7.4.16
  • OS: Big Sur
  • Browser: Chrome
  • Plugin Version: v1.3.0
  • Device: Macbook Pro

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

Acceptance criteria

Implementation Brief

Test Coverage

Visual Regression Changes

QA Brief

Changelog entry

@bethanylang bethanylang added Type: Bug Something isn't working Type: Support Support request Group: Escalation Issues which requires escalation labels Apr 14, 2021
@jamesozzie
Copy link
Collaborator

jamesozzie commented Apr 15, 2021

I've performed some testing on this. Reproducible as per this recording, more insights below:

  • Site Kit 1.30.
  • Moneytizer 8.1
  • New WordPress install, only Jetpack active
  • The dashboard errors appear when clicking on the Analytics tab only, reproducible as per suggested steps in original post
  • Commenting out the Google charts enqueue file below (in this line of themoneytizer_config.php) allows for the Site Kit dashboard to load as normal
    wp_enqueue_script('google_charts', $src ='https://www.google.com/jsapi',$deps = array(), $ver = false, $in_footer = false);

image

Full console errors:
googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1 TypeError: Cannot read property 'apply' of undefined
    at gvjs_gaa (jsapi_compiled_default_module.js:55)
    at gvjs_q (jsapi_compiled_default_module.js:56)
    at jsapi_compiled_default_module.js:299
    at Array.map (<anonymous>)
    at gvjs_iba (jsapi_compiled_default_module.js:299)
    at Object.gvjs_9k [as arrayToDataTable] (jsapi_compiled_default_module.js:300)
    at t (googlesitekit-module.a73642b369eba51ec9de.js:19)
    at googlesitekit-module.a73642b369eba51ec9de.js:19
    at Ui (googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1)
    at _a (googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1)
Pi @ googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1
Oi.i.componentDidCatch.n.callback @ googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1
Lg @ googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1
Kg @ googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1
va @ googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1
t.unstable_runWithPriority @ googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1
Mr @ googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1
Yj @ googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1
Lj @ googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1
(anonymous) @ googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1
t.unstable_runWithPriority @ googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1
Mr @ googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1
Hr @ googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1
zr @ googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1
_a @ googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1
t.unstable_runWithPriority @ googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1
Mr @ googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1
Sj @ googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1
(anonymous) @ googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1
z @ googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1
O.port1.onmessage @ googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1
googlesitekit-module.a73642b369eba51ec9de.js:66 Caught an error: TypeError: Cannot read property 'apply' of undefined
    at gvjs_gaa (jsapi_compiled_default_module.js:55)
    at gvjs_q (jsapi_compiled_default_module.js:56)
    at jsapi_compiled_default_module.js:299
    at Array.map (<anonymous>)
    at gvjs_iba (jsapi_compiled_default_module.js:299)
    at Object.gvjs_9k [as arrayToDataTable] (jsapi_compiled_default_module.js:300)
    at t (googlesitekit-module.a73642b369eba51ec9de.js:19)
    at googlesitekit-module.a73642b369eba51ec9de.js:19
    at Ui (googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1)
    at _a (googlesitekit-vendor.0c15cc710eaf5d89baf6.js:1) {componentStack: "↵    in GoogleChart↵    in div↵    in div↵    in s… RestoreSnapshots↵    in ErrorHandler↵    in Root"}
Debug Log:
[15-Apr-2021 22:04:59 UTC] PHP Notice:  Trying to get property 'site_tags' of non-object in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-shortcode.php on line 57
[15-Apr-2021 22:05:05 UTC] PHP Notice:  Undefined index: date_from in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:05:05 UTC] PHP Notice:  Undefined index: date_to in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:05:05 UTC] PHP Notice:  Undefined index: format in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:05:15 UTC] PHP Notice:  Undefined index: code in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 348
[15-Apr-2021 22:05:20 UTC] PHP Notice:  Trying to get property 'site_tags' of non-object in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-shortcode.php on line 57
[15-Apr-2021 22:05:26 UTC] PHP Notice:  Undefined index: date_from in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:05:26 UTC] PHP Notice:  Undefined index: date_to in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:05:26 UTC] PHP Notice:  Undefined index: format in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:05:26 UTC] PHP Notice:  Undefined index: code in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 348
[15-Apr-2021 22:05:41 UTC] PHP Notice:  Trying to get property 'site_tags' of non-object in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-shortcode.php on line 57
[15-Apr-2021 22:05:43 UTC] PHP Notice:  Undefined index: code in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 348
[15-Apr-2021 22:05:43 UTC] PHP Notice:  Undefined index: code in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 348
[15-Apr-2021 22:05:44 UTC] PHP Notice:  Undefined index: date_from in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:05:44 UTC] PHP Notice:  Undefined index: date_to in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:05:44 UTC] PHP Notice:  Undefined index: format in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:06:15 UTC] PHP Notice:  Trying to get property 'site_tags' of non-object in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-shortcode.php on line 57
[15-Apr-2021 22:06:21 UTC] PHP Notice:  Undefined index: date_from in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:06:21 UTC] PHP Notice:  Undefined index: date_to in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:06:21 UTC] PHP Notice:  Undefined index: format in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:06:50 UTC] PHP Notice:  Trying to get property 'site_tags' of non-object in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-shortcode.php on line 57
[15-Apr-2021 22:06:53 UTC] PHP Notice:  Undefined index: date_from in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:06:53 UTC] PHP Notice:  Undefined index: date_to in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:06:53 UTC] PHP Notice:  Undefined index: format in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:07:31 UTC] PHP Notice:  Trying to get property 'site_tags' of non-object in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-shortcode.php on line 57
[15-Apr-2021 22:07:38 UTC] PHP Notice:  Undefined index: date_from in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:07:38 UTC] PHP Notice:  Undefined index: date_to in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:07:38 UTC] PHP Notice:  Undefined index: format in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:07:45 UTC] PHP Notice:  Trying to get property 'site_tags' of non-object in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-shortcode.php on line 57
[15-Apr-2021 22:07:49 UTC] PHP Notice:  Undefined index: date_from in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:07:49 UTC] PHP Notice:  Undefined index: date_to in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:07:49 UTC] PHP Notice:  Undefined index: format in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:11:06 UTC] PHP Notice:  Trying to get property 'site_tags' of non-object in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-shortcode.php on line 57
[15-Apr-2021 22:11:11 UTC] PHP Notice:  Undefined index: date_from in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:11:11 UTC] PHP Notice:  Undefined index: date_to in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:11:11 UTC] PHP Notice:  Undefined index: format in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:11:26 UTC] PHP Notice:  Trying to get property 'site_tags' of non-object in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-shortcode.php on line 57
[15-Apr-2021 22:11:31 UTC] PHP Notice:  Undefined index: date_from in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:11:31 UTC] PHP Notice:  Undefined index: date_to in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:11:31 UTC] PHP Notice:  Undefined index: format in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:12:26 UTC] PHP Notice:  Trying to get property 'site_tags' of non-object in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-shortcode.php on line 57
[15-Apr-2021 22:12:36 UTC] PHP Notice:  Undefined index: date_from in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:12:36 UTC] PHP Notice:  Undefined index: date_to in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:12:36 UTC] PHP Notice:  Undefined index: format in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:17:53 UTC] PHP Notice:  Trying to get property 'site_tags' of non-object in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-shortcode.php on line 57
[15-Apr-2021 22:18:01 UTC] PHP Notice:  Undefined index: date_from in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:18:01 UTC] PHP Notice:  Undefined index: date_to in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494
[15-Apr-2021 22:18:01 UTC] PHP Notice:  Undefined index: format in /var/www/vhosts/232/1147031/webspace/httpdocs/ginza.ie/wp-content/plugins/the-moneytizer/themoneytizer-config.php on line 494

@bethanylang Moving to backlog for engineer review.

@jamesozzie jamesozzie removed the Group: Escalation Issues which requires escalation label Apr 15, 2021
@jamesozzie jamesozzie removed their assignment Apr 15, 2021
@abdullah1908
Copy link

Another user reported the same issue & have installed The Monetizer plugin.

@felixarntz
Copy link
Member

My initial intuition is that that plugin also uses the Google charts library, and maybe they are loading it unconditionally even on Site Kit-controlled screens. Basically they're still loading the version that Site Kit has had the conflict with, and the problem is they might be loading it in more places than they should.

I can have a look to verify, but if that's the case, the problem lies on their end rather than on ours.

@felixarntz felixarntz self-assigned this Apr 16, 2021
@felixarntz
Copy link
Member

Indeed, this is a problem in the "The Moneytizer" plugin, they load their CSS and JS unconditionally on all admin screens of WordPress, which causes this problem in Site Kit (see https://plugins.trac.wordpress.org/browser/the-moneytizer/trunk/themoneytizer-config.php#L3). I'm not sure what the best strategy is here, but this needs to be fixed on their end.

@bethanylang
Copy link
Collaborator Author

Per discussion in today's meeting, this issue needs to be fixed on The Moneytizer plugin. @jamesozzie will reach out via their support forum to request a fix. James, when you've done so, can you please close out this issue and link to your support topic? Thank you!

@jamesozzie
Copy link
Collaborator

Thanks all for reviewing.

@bethanylang I've created a WP Support topic now, you'll find it here. For impacted users feel free to keep watch of that support topic.

@jamesozzie
Copy link
Collaborator

Tested and confirmed the latest Moneytizer update has a fix in place (Version 9.0).

@felixarntz felixarntz removed their assignment May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working Type: Support Support request
Projects
None yet
Development

No branches or pull requests

4 participants