Background of the issue:
I was trying to translate my second page using WPML and encountered several warnings related to Elementor. The warnings occurred in the file located at /var/www/html/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Elementor/class-wpml-elementor-translate-ids.php. I was attempting to translate the page when the issue occurred. Here are some warnings that can be seen on my page:
Warning: Undefined array key "elements" in /var/www/html/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Elementor/class-wpml-elementor-translate-ids.php on line 120
Warning: foreach() argument must be of type array|object, null given in /var/www/html/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Elementor/class-wpml-elementor-translate-ids.php on line 112
Warning: foreach() argument must be of type array|object, null given in /var/www/html/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Elementor/class-wpml-elementor-translate-ids.php on line 133
Warning: foreach() argument must be of type array|object, null given in /var/www/html/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Elementor/Hooks/DynamicElements.php on line 71
Warning: foreach() argument must be of type array|object, null given in /var/www/html/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Elementor/Hooks/DynamicElements.php on line 71type array|object, null given in /var/www/html/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Elementor/Hooks/DynamicElements.php on line 71
Warning: foreach() argument must be of type array|object, null given in /var/www/html/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Elem
Warning: foreach() argument must be of entor/Hooks/DynamicElements.php on line 71
Symptoms:
I received multiple warnings such as 'Warning: Undefined array key "elements"' and 'Warning: foreach() argument must be of type array|object, null given' in various lines of the class-wpml-elementor-translate-ids.php file and DynamicElements.php file.
The problem is with the Consulting Elementor Widgets plugin.
When it is deactivated, the warnings do not show.
Can you please confirm this?
Also, can you please tell me what this plugin's purpose is?
Thanks for your investigation Itamar.
The plugin is needed. This is a core plugin of the Consulting Theme. It enables CTA Buttons and other widget that are part of the wordpress theme / template.
Our compatibility team further escalated this issue to our developers.
I've read our internal documentation about this case, and we will need to contact the Consulting Elementor Widgets plugin to correct things on their side. In any case, I'll keep you updated on any news here.
The developers of the Consulting Elementor Widgets plugin wrote to us to say they would look into this problem. Meanwhile, we published an errata page about it.
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.