[Resolved] WooCommerce Multilingual & Multicurrency Plugin crashed completely the website
This thread is resolved. Here is a description of the problem and solution.
Problem: You are experiencing a website crash when using the WooCommerce Multilingual & Multicurrency Plugin, which also stops product translations from working after deactivation. The issue seems to be exacerbated by the use of multiple caching plugins, specifically Docket Cache. Solution: We recommend clearing the cache used by the Docket Cache plugin and deactivating it to see if this resolves the issue. It's also advisable to avoid using multiple caching plugins simultaneously. Instead, you could use a WPML-compatible cache plugin for better performance. You can find a list of compatible plugins here: https://wpml.org/plugin/.
If this solution does not apply to your case, or if it seems outdated, please check for related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. If the problem persists, we highly recommend opening a new support ticket for further assistance.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Background of the issue:
This morning, I was trying to use the WooCommerce Multilingual & Multicurrency Plugin, but it completely crashed the website. I had to deactivate it to make the website work again. Now, product translations are not working anymore.
Symptoms:
The plugin crashed the website, and after deactivation, product translations stopped working.
When errors are not caught, the server stops everything and returns a page that says “500 error” or an empty page. Different servers are configured to display these errors slightly differently, but they all mean the same – there is an unhandled PHP error in the site’s code.
First, you need to see what the errors are. Guessing what might be the problem and trying different solutions may lead to even more trouble. The first step is to enable debugging. You can add a few lines to the site’s wp-config.php file. With the error log enabled, you will see what the actual problem is.
To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:
define('WP_DEBUG', true);
To enable the error logging to a file on the server, you need to add yet one more similar line:
define( 'WP_DEBUG_LOG', true );
The errors will be saved to a debug.log log file inside the /wp-content/directory.
Let me know what you see in the debug.log after enabling debug mode. You might need to activate the WooCommerce Multilingual & Multicurrency Plugin to log the error.
I managed to get the error log however there are hundreds if not thousands of line in there. And multiple lines are referring to the WooCommerce Multilingual & Multicurrency Plugin
Here are some exemples:
[21-Aug-2024 03:44:47 UTC] PHP Warning: include(/home1/flwpptmy/public_html/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/vendor/composer/../../classes/Integrations/Gutenberg/IdsInBlock/Base.php): failed to open stream: No such file or directory in /home1/flwpptmy/public_html/wp-content/plugins/query-monitor/vendor/composer/ClassLoader.php on line 576
[21-Aug-2024 03:44:47 UTC] PHP Fatal error: Uncaught Error: Class 'WPML\PB\Gutenberg\ConvertIdsInBlock\Base' not found in /home1/flwpptmy/public_html/wp-content/plugins/woocommerce-multilingual/classes/Block/Convert/ConverterProvider.php:136
#7 /home1/flwpptmy/public_ in /home1/flwpptmy/public_html/wp-content/plugins/woocommerce-multilingual/classes/Block/Convert/ConverterProvider.php on line 136
[16-Oct-2024 20:30:57 UTC] PHP Fatal error: Uncaught Error: The script tried to call a method on an incomplete object. Please ensure that the class definition "WCML_Currency_Switcher_Template" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide an autoloader to load the class definition in /home1/flwpptmy/public_html/wp-content/plugins/woocommerce-multilingual/inc/currencies/currency-switcher/class-wcml-currency-switcher-templates.php:413
thrown in /home1/flwpptmy/public_html/wp-content/plugins/woocommerce-multilingual/inc/currencies/currency-switcher/class-wcml-currency-switcher-templates.php on line 413
[16-Oct-2024 20:39:02 UTC] PHP Fatal error: Uncaught Error: The script tried to call a method on an incomplete object. Please ensure that the class definition "WCML_Currency_Switcher_Template" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide an autoloader to load the class definition in /home1/flwpptmy/public_html/wp-content/plugins/woocommerce-multilingual/inc/currencies/currency-switcher/class-wcml-currency-switcher-templates.php:413
I did what you asked and with the caching plugins off it worked. I then activated them and it crashed again. So, I tried them one by one and it seems like the problem was coming from "Docket cache". When activated it seems to create a conflict.
I was running 2 cache plugins: WP Rocket and Rocket cache. Rocket cache for persistent object cache.
Good catch! We haven't yet tested the Docket cache plugin for compatibility with WPML. I recommend clearing the cache used by this plugin and trying to deactivate various settings if available.
Alternatively, consider using one of our compatible plugins: https://wpml.org/plugin/. By the way, the WP Rocket plugin works well with WPML.
It's best to avoid using multiple cache plugins. Instead, choose one and set it up for maximum performance.