Skip Navigation

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

Problem:
When linking to popups in Elementor, the links revert to the original language version each time the page or its translations are updated.
Solution:
We identified that this issue might be related to caching in Elementor. Clearing the cache in Elementor > Tools might temporarily resolve the display issues. However, for a more permanent fix, consider recreating the buttons that trigger the popups on your pages. Additionally, we have provided a workaround involving adding specific code to your functions.php file:

/**
 * Convert the popup link in a container
 * compsupp-7641 workaround
 */
add_filter( 'wpml_pb_elementor_widget_dynamic_id_converters', function( $converters ) {
	$isContainer = \WPML\FP\Relation::propEq( 'elType', 'container' );

	$containerLinksLens = \WPML\FP\compose(
		\WPML\FP\Obj::lensProp( 'settings' ),
		\WPML\FP\Obj::lensPath( [ '__dynamic__', 'link' ] )
	);
	return array_merge(
		$converters,
		[
				[ $isContainer, $containerLinksLens, 'popup', 'popup' ],
		]
	);
} );

Please ensure to back up your site before applying this code. If this solution does not resolve your issue or becomes irrelevant due to updates, we recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If issues persist, please open a new support ticket.

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 17 replies, has 2 voices.

Last updated by Kor 8 months, 2 weeks ago.

Assisted by: Kor.

Author Posts
September 25, 2024 at 6:10 pm #16218044

skyE

Background of the issue:
Whenever I link to popups in Elementor, it seems I have to manually link to the translated version of those popups in each translated version of the page. Then, any time I make a change to the page and update the translations, those links revert back to the popups in the original language.

Symptoms:
Links to Elementor popups revert to the original language popups/links every time I update the page/translations.

Questions:
Is there any way to make those translated popup links 'stick' so I don't lose them every time I update the page/translations?

September 25, 2024 at 7:14 pm #16222349

skyE

Hey, I didn't want to leave the live site "broken" so I restored my backup. I'm going to copy the live site to Dev and send you a new link/access for that, so you can tinker there...

September 25, 2024 at 7:15 pm #16222351

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

I apologize for that. I've enabled the private reply option so that you can share access to your staging site.

September 26, 2024 at 4:51 pm #16226847

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thank you for your patience.

I regret any inconvenience caused, but to proceed with troubleshooting, I kindly ask for a snapshot of the site. Alternatively, with your permission, I can create one myself. For this purpose, I typically recommend using the free plugin "Duplicator." If you're already familiar with Duplicator (https://wordpress.org/plugins/duplicator/), please skip the following steps and simply send me the archive file you downloaded.

To guide you further, please adhere to these instructions:

1. View the Duplicator instructions video: hidden link

2. Consult WPML's instructions on providing supporters with a copy of your site: https://wpml.org/faq/provide-supporters-copy-site/

3. If the archive file exceeds 400MB, please use Duplicator's file filters to exclude cache, wp-uploads directory, media, and archive files.

Once you have the archive file ready, kindly share the link with us. You can utilize platforms like Google Drive, Dropbox, or similar for file sharing, as the snapshot file might be large.

Please note that your next reply will be private, visible only to you and me. You can paste the file link there. Rest assured that once the issue is resolved, I will delete the local site.

September 26, 2024 at 7:40 pm #16227404

skyE

Sure, you can try to create a snapshot of the dev site ( hidden link ) if that's what you mean -- I just tried and got a Host Build Interrupt error (see attached).

Thanks and lmk if you have any other questions.

Screenshot 2024-09-26 at 12.39.48 PM.png
September 27, 2024 at 9:05 pm #16231277

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience. I've successfully downloaded a copy of the site and I will investigate this further on our dev end and will come back to you as quickly as possible.

September 30, 2024 at 6:21 pm #16237434

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

I've tested it here on our sandbox site hidden link and the button links to the correct popup here hidden link on the translated language.

Not sure if this is related to a different setup and could you check and see if you're able to replicate the issue on our sandbox site?

September 30, 2024 at 10:34 pm #16237731

skyE

Thanks for the sandbox. So, not sure if you remember, the problem occurs when you make a change in Elementor to the original language page and then update the translations -- did you test after making a change and updating the NL translation? I tried to test that in the sandbox, but I can't even get my change to show in the translation. I changed the English button text to TESTING and updated the NL translation with "TESTING NL" as the translated button text, but the button still reads "Click here" on the NL page. I tried adding some text below the button too -- do you know why those changes don't seem to take on the translated page?

October 2, 2024 at 9:51 am #16244576

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

Let me check and come back to you.

October 4, 2024 at 8:32 am #16252902

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

I apologize for the delays.

It appears to be an issue with caching in Elementor. I cleared the data in Elementor > Tools, and it’s now displaying the edits I've made in English.

However, after translating it to Dutch, the popup is still showing the translated content on the translated page.

Looks like the issue could be isolated to your end. Can I have a new login token to your staging site?

October 5, 2024 at 6:33 pm #16257070

skyE

Ah, I see -- and did you set that NL popup by manually editing the NL page in Elementor, or were you able to somehow translate the link to that popup or set it some other way? Regardless, thanks for your efforts and here's another temp link to the dev site:

hidden link

October 7, 2024 at 6:12 pm #16263235

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience.

I've created a test page here hidden link and it works fine when I switch language to Spanish.

Maybe you can consider recreating the buttons on your pages that trigger the popup.

October 7, 2024 at 7:39 pm #16263408

skyE

Hmm, maybe it's because I'm using the Edit Container > Additional Options > HTML Tag > a (link) to link the popups (see attached). I was able to recreate the issue that way on your test page. I reset it to Spanish so you could more easily recreate it yourself, if you want -- I think if you make a change to the English page and update the Spanish page, you'll see the Spanish container link/popup switch back to English.

Screenshot 2024-10-07 at 12.30.42 PM.png
October 8, 2024 at 6:38 pm #16267177

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

I can replicate it here now hidden link and I will escalate this further to our 2nd Tier Support for further investigation.

October 9, 2024 at 5:34 pm #16271922

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience. I've just escalated this and I will come back to you once I've updates.