Closed tomalec closed 3 years ago
Hi there,
I have problems with LiteSpeed cache and Google Listing & Ads. How can I fix these? https://ufile.io/h3znbof2 https://ufile.io/6kza7rxo These errors accurre when I activate LiteSpeed cache plugin.
I actually have two Google listing plugins: WooCommerce Google Product Feed Google Listings and Ads
In Google Listing and Ads it says this: The Google Product Feed plugin may cause conflicts or unexpected results. What to do? Deactivate the Google Product Feed plugin from your store
Hi @TuomoNurkkala
This repository is not intended for support requests. The best place to start the process is with the WordPress.org Google Listings and Ads forum or if you have a WooCommerce.com account, you can start a chat or open a ticket on WooCommerce.com support. I'd suggest to include your system status report as well as additional details to reproduce the issue.
The support team will help guide you through some problem solving and get some more information to give us a bit more context/background on your concerns/report above.
As mentioned in the warning it's not suggested to run both of those Google plugins together as they won't create separate product feeds which can lead to duplicate products and unexpected results. My suggestion would be to pick only one plugin to use.
For the litespeed error, it relies on a second JS script wp-includes/js/dist/hooks.min.js
to be loaded first. Which means that it's not compatible with the JavaScript minification settings in litespeed. So you would either need to disable this or find a way to exclude certain scripts or change their load order. It might be best to contact litespeed on how that configuration would work.
Hi @mikkamp Thanks! I have started support request there.
Thank you for this clarification that I should just run one Google listings plugin.
I started a support request with Litespeed cache as well. :)
Describe the bug:
The issue was originally reported at https://wordpress.org/support/topic/fatal-error-3907/
The user receives fatal errors
Technical details
(the following findings are thanks to @mikkamp investigation)
It seems that WordPress method
delete_transient
at https://github.com/woocommerce/google-listings-and-ads/blob/trunk/src/Options/Transients.php#L89 returns integer unexpectedly. This is due to the fact that LiteSpeed Cache, overwritesglobal $wp_object_cache;
with an incompatible API https://plugins.trac.wordpress.org/browser/litespeed-cache/trunk/src/object-cache.cls.php#L494Expected behavior:
Both plugins should be able to work together, and not throw critical errors.
Actual behavior:
Critical error (as above) is logged overnight.
Steps to reproduce:
I didn't reproduce it yet, but I guess the steps should be more-or-less, like following
Additional details:
In a perfect world, LiteSpeed Cache should not break the API or the WordPress API should be extended to allow integers officially. I raised an issue in LSC, to prevent incompatibilities with other plugins.
For now, to unlock our merchants sooner, and be more defensive on our end, we could cast to
bool
.