Error in plugin after latest Yoast update
-
“Cannot redeclare class Yoast_Google_CacheParser” after last yoast update
-
Same thing here. Any fix available?
It seems to be a problem with Yoast. I already opened a ticket with them.
https://wordpress.org/support/topic/php-fatal-error-cannot-redeclare-class-yoast_google_cacheparser/
The issue is related to a new added function called wpseo_init_rest_api in wordpress-seo/wp-seo-main.php.
The exact line of code is this one:
add_action( 'init', 'wpseo_init_rest_api' );
Commenting out that line like this
// add_action( 'init', 'wpseo_init_rest_api' );
fixed the issue. Or reverting to 3.5 also does the trick.Hopefully they fix this in a new release.
Thank you
This is the last reply to my ticket from Yoast:
From quick look through the code the widget plugin relies on loading class files from Analytics plugin explicitly, rather than rely on autoload.
I would recommend to report this to its developer first.
On Yoast SEO side this is going through autoload, so it should never cause a fatal error just from that (though it might have issues if expected versions are out of sync).
Unfortunately, there hasn’t been much activity lately from the Google Analytics Top Content Widget plugin author in these forums, so hopefully, the plugin isn’t abandonned. If so, this means it probably won’t be compatible at all with Yoast SEO in future versions.
The bug seems to be gone in new Yoast SEO 3.7.0.
Can anyone else confirm this?
Just updated Yoast to 3.7.0
It seems you’re right. The bug is goneThanks, @janvitos and @yoavshai — we were running into a similar problem (with a slightly different error message, a different class was being redeclared) on one of our sites and just updating the Yoast plugin again fixed it.
PHP Fatal error: Cannot redeclare class Yoast_Google_IO in {...}/wp-content/plugins/google-analytics-for-wordpress/vendor/yoast/api-l ibs/google/io/Google_IO.php on line 23
-
This reply was modified 8 years, 8 months ago by
kenjigarland.
Since Yoast SEO is now Monster Insight SEO and they’re going to rework the plugin from the ground up, is there any plan from the dev to update the plugin?
Just for clarification, Google Analytics by MonsterInsights was Yoast’s Google Analytics plugin not his SEO plugin, which they still develop.
Whoops sorry, stupidly I mistook Yoast SEO with Yoast Analytics. I hope this plugin is still going to work after the MonsterInsight update.
Yes, my plan is to maintain the plugin, though there is no guarantee that things won’t break with each update to their plugin, unless they provide me advanced access to the releases, and even then, I cannot guarantee my availability will align with their release schedule. Best answer I can give is that I will do my best.
Hey Justin,
Can you shoot us an email at support@monsterinsights.com and we can get you setup with a new copy. Also, I can see if I can try taking a stab at updating it later this week.-Chris
Thanks Chris. Just sent it.
Thanks to Chris’ (chriscct7) contribution, I was able to push an update to the plugin tonight. You should see 1.7.0 available in your dashboards and the plugin is now fully compatible with Monster Insights. https://wordpress.org/plugins/google-analytics-top-posts-widget/changelog/
-
This reply was modified 8 years, 3 months ago by
Justin Sternberg.
-
This reply was modified 8 years, 8 months ago by
- The topic ‘Error in plugin after latest Yoast update’ is closed to new replies.