Skip Navigation

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

Problem:
The client reported issues with WPML where languages were mixing on their website's English and Danish versions. Specifically, Danish links were appearing in English pages, and updates to translated versions were reverting to old content. Additionally, the client noted that the 'Edit Translation' page appeared differently after an update.
Solution:
We identified a bug related to the theme's compatibility with WPML. We recommended a workaround involving a modification in the theme's code. The client should locate the file at

/wp-content/themes/themify-ultra/themify/themify-builder/includes/plugin-compat/wpml-translation.php

and find the specific block of code. The modification involves changing the line

ThemifyBuilder_Data_Manager::save_data( $builder_data, $translated_post_id );

to

if (!empty(self::$translations)) { ThemifyBuilder_Data_Manager::save_data( $builder_data, $translated_post_id ); }

. This change prevents the system from updating the front page automatically with incorrect language data.

If this solution does not resolve the issue or seems irrelevant due to updates or different circumstances, we recommend opening a new support ticket. Additionally, it's advisable to check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. For further assistance, please visit our support forum at WPML Support Forum.

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 24 replies, has 0 voices.

Last updated by Dražen 1 month, 2 weeks ago.

Assisted by: Dražen.

Author Posts
May 16, 2025 at 1:51 pm #17042240

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks, I checked and could see the issue.

I tried old staging site you have provided but there it works fine.

Can you please remove that staging site and create new one, so I can continue to check the issue. It is not very grateful to check on production site, since I am causing your content to be lost in EN language.

Let me know when done and URL of staging site.

We also have a new WPML version on Monday, which fixes similar issue, so it might also help your case.

Regards,
Drazen

May 16, 2025 at 2:31 pm #17042478

hanneO

Hello

I have created a new staging site. You find it here
hidden link

Sounds great, if the new WMPL version solve the issue. It is really frustrating that the readers get a bad experience on the site, when it is a mess of languages.

And thanks for taking af further look

Best,

Hanne

May 19, 2025 at 6:18 am #17046449

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello Hanne,

thanks, I checked and confirmed issue on staging site.

I have now escalated the issue to our 2nd tier, since I see using latest new release of WPML did not help with your issue.

I will update when I have some news from 2nd tier.

Regards,
Drazen

May 19, 2025 at 8:56 am #17047304

hanneO

Hello Drazen,

Thanks a lot. Yes, the issue is still there.

I will wait for your reply.

Best,

Hanne

May 22, 2025 at 4:31 pm #17062992

hanneO

Hello Drazen

Do you have any news about this issue?

Best,

Hanne

May 23, 2025 at 6:06 am #17064283

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello Hanne,

our 2nd tier are still checking, seems issue does not happen on new page, but only on specific one.

I will update when I have some news, but it may take a while.

Regards,
Drazen

May 23, 2025 at 8:40 am #17064973

hanneO

Hello Drazen,

Thank you for the update. I will wait for your response.

Best,

Hanne

May 28, 2025 at 8:13 am #17081835

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

we found a bug, and we will forward this to theme author as they will need to fix and adjust code in the theme files. I have added next workaround and seems to work fine now.

Find file /wp-content/themes/themify-ultra/themify/themify-builder/includes/plugin-compat/wpml-translation.php

Find code:

// Make sure the package is for our plugin
		if ( 'Themify Builder' === $package_kind ) {
			$builder_data = ThemifyBuilder_Data_Manager::get_data( $original_post->ID );
			if ( ! empty( $builder_data ) && is_array( $builder_data ) ) {
				self::$translations = self::group_string_translation_by_elementid( $string_translations, $lang );
				foreach ( $builder_data as $index => $row ) {
					$builder_data[ $index ] = self::recursive_translate_fields( $row );
				}
			}
			ThemifyBuilder_Data_Manager::save_data( $builder_data, $translated_post_id );
		}

Change ThemifyBuilder_Data_Manager::save_data( $builder_data, $translated_post_id ); to next:

			if (!empty(self::$translations)) {
				ThemifyBuilder_Data_Manager::save_data( $builder_data, $translated_post_id );
			}

Please try and let me know if it works fine for you.

Regards,
Drazen

May 28, 2025 at 8:18 am #17081878

hanneO

Hi Drazden,

I am glad, that you found the bug.

I am not comtable with changing the Theme code though, as I am not technical minded 🙂 But I can forward your reply and suggestion to the Themify Team and they can take a look at it. If you also have contacted them, then I guess they will try to solve it. I will be back, when I have been in contact with them and tested the code.

Best,

Hanne

May 28, 2025 at 8:49 am #17082213

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello Hanne,

sure, how ever it works for you.

If you need further help, we can also adjust the code for you in your live website.

Regards,
Drazen