Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 - -
16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 - -

Supporter timezone: Asia/Jerusalem (GMT+03:00)

Tagged: 

This topic contains 0 replies, has 0 voices.

Last updated by Itamar 1 day, 21 hours ago.

Assisted by: Itamar.

Author Posts
March 25, 2025 at 12:57 pm

malteM-7

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.

Questions:

March 25, 2025 at 1:54 pm
March 25, 2025 at 2:35 pm #16858501

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

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,
Itamar.

March 25, 2025 at 3:51 pm #16858815

malteM-7

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.

KR

Malte

March 26, 2025 at 10:13 am #16861505

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Malte.

I've escalated this issue to our compatibility team. I'll keep you updated when I have news.

I appreciate your patience.
Itamar.

April 2, 2025 at 5:59 pm #16888454

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

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.

I appreciate your patience.
Itamar.

April 10, 2025 at 7:24 pm #16920358

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

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.

https://wpml.org/errata/consulting-theme-the-sidebar-widget-may-trigger-php-warnings/

Regards,
Itamar.