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.

Tagged: 

This topic contains 10 replies, has 2 voices.

Last updated by Long Nguyen 1 year, 9 months ago.

Assisted by: Long Nguyen.

Author Posts
July 5, 2023 at 8:11 pm #13953985

Sylvain

I have a site built on Divi and I use Classic Editor.

1- I complete my original language page (fr) and save.
2- I translate all texts using Classic Editor, mark as complete and save.

Then if I edit my original language (ex.: add one word or paragraph) and save, my translation is lost and the classic Editor shows me the French version instead of lettin me edit my English translation.

I have over 100 sites built with same theme and WPML and never experienced this before.

July 6, 2023 at 4:15 am #13954617

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Sylvain,

Thank you for contacting WPML support, I'd be happy to help you with this issue.

Please let me know a specific post/page where I can see the issue, then I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to a testing site where the issue is replicated. Your next reply is set to private to share the info.

❌ IMPORTANT: Please backup your database and website before proceeding ❌
You can use this plugin to create the backup: 
https://wordpress.org/plugins/duplicator/
✙ I would need your permission to de-activate and re-activate Plugins and the Theme and to change configurations on the site if needed. This is also a reason the backup is critical.

Look forward to your reply.
Thanks

July 7, 2023 at 2:35 am #13963669

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I make a small change to the page title > update the translation and see the translation content in English is available there. I don't see any issue when updating the translation of that page. Here is the screenshot hidden link

Please make sure you are using the same translation editor: WordPress editor or WPML translation editor, refer to the documentation https://wpml.org/faq/why-arent-my-translations-showing/

Look forward to your reply.
Thanks

July 7, 2023 at 3:03 am #13963685

Sylvain

Please try again but change some text in the page content (divi text module). I forgot to mention but titles are fine, only content has problem. Thank you.

July 7, 2023 at 4:23 am #13963799

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I see that issue and I think it is an expected behavior when working with WPML Classic Translation Editor. You can see the Text module on that page displayed in one section in the translation editor. That means if you make a change to the section content > you will need to translate the section again.

To better understand, you can create a new Text module > translate the page and make a change to each module to see how it works.

If you don't want to translate each paragraph in the section content again, you can use the Advanced Translation Editor, it will help you to split content into segments and you can translate the adjusted segments only.
Or use the WordPress editor to translate content manually.

Refer documentation https://wpml.org/documentation/translating-your-contents/advanced-translation-editor/

Look forward to your reply.
Thanks

July 7, 2023 at 3:11 pm #13969097

Sylvain

As mentioned in my first message, I have over 100 sites made with the exact same setup. I can assure you this is not standard behaviour. I do that all the time and never had this problem before now.

However I tested it on another site (WPML 4.6.4) and same thing happens. Then I tested on one site that was not updated (WPML 4.6.3) and translation was not lost (see attached image).

So I rolled back to 4.6.3 on calacas-chateauguay.ca and the problem is now gone. This means you should report a bug with version 4.6.4.

Thank you

screenshot.png
July 12, 2023 at 7:30 am #14019795

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

My colleague told me that you need more assistance with this issue so I re-open this ticket. From my side, it's not an issue and it works like you are using Advanced Translation Editor. When you adjust the content of a section, that means you need to re-translate the section.

I test this issue with WPML 4.6.3 and it works as you said and it looks fixed in the new version 4.6.4. I'm asking our 2nd tier support about this case and update you here when I have something to share.

Thanks.

July 12, 2023 at 7:41 am #14020001

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Please try to apply this workaround to fix the issue on your site.

❌ IMPORTANT: Please backup your database and website before proceeding ❌

- Edit the file wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Shared/st/class-wpml-pb-string-translation.php

- Around line 22-39, replace the code

public function get_package_strings( array $package_data ) {
	$strings    = array();
	$package_id = $this->get_package_id( $package_data );

	if ( $package_id ) {
		$getPackageStrings = Cache::memorize(
			self::CACHE_GROUP_KEY,
			HOUR_IN_SECONDS,
			function( $packageId ) {
				return $this->getPackageStringsFromDb( $packageId );
			}
		);

		$strings = $getPackageStrings( $package_id );
	}

	return $strings;
}

with this one

public function get_package_strings( array $package_data ) {
	$strings    = array();
	$package_id = $this->get_package_id( $package_data );

	if ( $package_id ) {
		$getPackageStrings =
			function( $packageId ) {
				return $this->getPackageStringsFromDb( $packageId );
			};

		$strings = $getPackageStrings( $package_id );
	}

	return $strings;
}

Refer to this ticket https://wpml.org/forums/topic/changes-in-main-language-de-en-translation-gets-replaced-with-de-text/

Look forward to your reply.
Thanks

July 17, 2023 at 3:17 pm #14051183

Sylvain

Hi, in response to :

«I test this issue with WPML 4.6.3 and it works as you said and it looks fixed in the new version 4.6.4. I'm asking our 2nd tier support about this case and update you here when I have something to share.»

First I use CLASSIC Editor and not advanced and it is more the opposite. Like with version 4.6.3 or lower the problem does not occur. Only when I update to 4.6.4 the problem starts which suggests that a recent change brought up this problem. That is why I wanted to file a bug report.

About the suggested code change: Is it a fix you intend to do in next version? Cause if I modify the plugin code I will have to stop making updates which does not look to me as a good long term solution.

Thank you.

July 18, 2023 at 2:55 am #14053975

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Yes, the fix for this issue will be included in the next update of WPML 4.6.5. For now, please use the workaround that I shared above or use WPML 4.6.3 if you want.

Thanks for your patience and have a good day.