Home›Support›English Support›[Resolved] WPML Multicurrency plugin (only) has caused a major Elementor error
[Resolved] WPML Multicurrency plugin (only) has caused a major Elementor error
This thread is resolved. Here is a description of the problem and solution.
Problem: If you're experiencing issues with editing pages using Elementor when the WooCommerce Multilingual & Multicurrency plugin is activated, and you're also encountering errors when publishing new pages, the problem might be related to the memory limit set for your WordPress site. Solution: First, check the memory limit of your website. WPML requires a minimum memory limit of 128MB, with 256MB recommended. You can increase the WordPress memory limit by adding the following code to your wp-config.php file:
define('WP_MEMORY_LIMIT', '256M');
define('WP_MAX_MEMORY_LIMIT', '512M');
Ensure that these lines are added before the line:
I am trying to: edit info on this site via Elementor page builder. (this is how i found out about the problem)
Link to a page where the issue can be seen: Any page on the site
So this site has WPML since its creation in 2020. As we sell a few products, the information there is updated once or twice per year. A month ago we needed to update some info again but we couldnt open the pages. When we tried to open them via Elementor (they are bulid with it) they couldnt. Elementor suggested Safe mode but neither that helped.
Further more if we tried to publish a brand new page - WordPress showed error as well.
As we have elementor and WPML running on all our sites and all updated till the last version, we didint expect the cause to be WPML.
However, this week we have new products & info to publish on the site which made the problem Urgent.
We added a Under Construction notice and started checking everything (turnning plugins on and off.) It tuned out (for our suprise) that the problem is from WPML and most specificly the WooCommerce Multilingual & Multicurrency plugin. Only when we activate it WooCommerce Multilingual & Multicurrencys, elementor shows the error.
Right now all other plugins are active (Including CMS and etc.) but not WooCommerce Multilingual & Multicurrency and we can edit the Elementor pages as normal. Now the site is active but with inactive Currency plugin. (We will sell only in EURO untill we resoolve the issue)
Thank you for sharing the information. I checked your debug info and noticed that your website doesn't have the minimum memory required for WPML to work. WPML requires a memory limit of at least 128MB while 256MB is recommended. See https://wpml.org/home/minimum-requirements/ for detailed information. You can set WP Memory Limit in your wp-config.php file by adding following code:
See https://wordpress.org/support/article/editing-wp-config-php/#increasing-memory-allocated-to-php for details. Increasing WP Memory may help improve the performance and sometimes also help resolving such issues.
When i added the code to the config file, everywhere in the site it showed me these:
----------------------------------
Warning: Constant WP_MEMORY_LIMIT already defined in *path*/wp-config.php on line 99
Warning: Constant WP_MAX_MEMORY_LIMIT already defined in *path*/wp-config.php on line 100
Warning: Cannot modify header information - headers already sent by (output started at *path*/wp-config.php:99) in *path*/misc.php on line 1431
Warning: Cannot modify header information - headers already sent by (output started at *path*/wp-config.php:99) in *path*/functions.php on line 7049
Warning: Cannot modify header information - headers already sent by (output started at *path*/wp-config.php:99) in *path*/admin-header.php on line 9
------------------------------------------------------
So I removed the lines again.
Any idea why that happened?
It seems that there was already code for the memory in your wp-config.php file. I recommend you check the code, and remove any other line of code that contain "WP_MEMORY_LIMIT" or "WP_MAX_MEMORY_LIMIT" and leave only the ones I sent.
Please make sure that the code I sent is added before the line