Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client has a popup window on their website that is only intended to appear on the Hungarian main page, but it is also appearing on the English main page.
Solution:
We have identified that the issue arises because Elementor loads the conditions for popups globally, which may include caching, and not directly from the

_elementor_conditions

field. WPML automatically translates the condition IDs, which can cause the popup to appear on all language versions of the page. To resolve this, we recommend the following steps:
1. Install the JSM Show Post Meta plugin.
2. Navigate to the translated Popup edit screen.
3. Click on the "X" icon next to the

_elementor_popup_display_settings

field at the bottom of the page.
4. Save the changes.
By removing the

_elementor_popup_display_settings

custom field from the translated popup, the condition for displaying the popup will not be applied to that translation.
If you're experiencing this issue and the solution provided does not seem relevant, or if you encounter any other problems, please open a new support ticket with us.

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.

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by Lauren 2 months, 1 week ago.

Assisted by: Lauren.

Author Posts
December 8, 2023 at 1:58 pm #15026235

Zoltan

There is a popup window on our website. This is only created in Hungarian, we don't even want it in English. How can we set it to appear only on the main page in Hungarian? It is currently appearing on the English main page as well.

December 8, 2023 at 3:43 pm #15026995

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

I have escalated this ticket to our compatibility team. In the meantime please try the workarounds provided in our chat until we can find a permanent solution. I will update here when I have more information.

December 14, 2023 at 8:38 pm #15068757

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

Our deveopers checked the code and this is the default WPML + Elementor behavior. Having a different condition settings per language is not often used, so we had to look at an alternate solution.

It seems that ELementor loads the conditions globally (maybe from cache?) and not directly from the _elementor_conditions field. These conditions for popups are loaded in wp-content/plugins/elementor-pro/modules/theme-builder/classes/conditions-manager.php::get_location_templates().

There, WPML uses the elementor/theme/get_location_templates/template_id and elementor/theme/get_location_templates/condition_sub_id to automatically translate the condition ID's. This happens on app/public/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Elementor/class-wpml-elementor-translate-ids.php

It's not safe to disable these filters, as it can cause other issues.

The only workaround we found is to remove the _elementor_popup_display_settings custom field from the translated popup.

He was able to do it with the following steps:

1. Install the JSM SHow postmeta plugin
2. Go to the translated Popup edit screen
3. Click on "X"icon next to the _elementor_popup_display_settings field, at the bottom of the page
Save

Without this field, the popup condition is not being applied.

Maybe it also works with a new translation by setting the _elementor_popup_display_settings as don't translate, but it can cause other issues so we suggest the steps above.

Please let me know if the steps above resolve the issue for you.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.