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 12 replies, has 3 voices.

Last updated by Subash Chandra Poudel 1 year, 11 months ago.

Assisted by: Subash Chandra Poudel.

Author Posts
June 28, 2023 at 4:13 pm #13912221

Mandy

Hello!

I am trying to translate content from German into English.

When I change some text on the original language (German) and then I go into the WPML translation editor to update the English translation - the "old" english text gets overwritten by the updated text in German. This is very strange and I'm sure it's not the way the plugin is supposed to work.

It's happening in the Divi Builder and Gutenberg.

I can send you the login details to check this problem.

Thank you!
Mandy

June 29, 2023 at 11:15 am #13917541

Mandy

Hello, when can I expect your feedback?
Is it normal that it takes so long? Sorry for my impatience!

June 29, 2023 at 7:05 pm #13920205

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi Mandy,

While waiting for one of my colleagues to help you, please review the following

Is this happening with all the page's content or just specific content?

If possible, please edit your page in the default language->switch to the translation language using the language switcher at the top header (dismiss the warning)

Note: If you do not see the language switcher exit Guttenberg full screen

Do you see an option at the top right to "translate independently"? If the pages are synced the content from the default language would overwrite the translation language content.

This can happen when you duplicate from the default to the translation and then manually edit the translation without breaking the synchronization.

Let us know your results, please.

June 30, 2023 at 7:44 am #13921281

Mandy

Hi Bobby,
thanks for your response!
This problem is happening on all pages.

"Do you see an option at the top right to "translate independently"?"
=> I followd your instructions but no, I don't see this option.

We always create the page for the main language first and then we start the translation using the classic translation editor. This did work well for some time, but now when we try to make changes in the German text of any page, the English text gets replaced by the edited german text.

What I think might cause the problem: when the users accidentally opened the translated page in the WP or Divi editor and do changes there. Then the system gets confused. Is there any way to avoid this? I don't get any warning when opening a translated page in the editor.

Thanks again for your help!
Mandy

June 30, 2023 at 5:37 pm #13925267

Subash Chandra Poudel

Hi Mandy,

When you try to edit the Translated pages directly you should get a warning that you are trying to edit the Translation Page by default unless you set to edit the pages independently or with WordPress editor at some point of time as explained in the next link:
https://wpml.org/documentation/translating-your-contents/using-different-translation-editors-for-different-pages/#how-to-use-manual-translation

From the behaviour that when you update the primary language page the translation page is being copied from the primary language and that it sounds like the translation page is duplicated from the primary language as explained in the link I shared above.

Can you please go to WPML -> Translation management and search for the page then confirm if the translated page is duplicated from primary language or translated by hovering over the languages icon below the languages/flag column? It will show you the translation status of the page.

If the pages shows as Duplicate there incorrectly please select the pages, then select "Translate" for "Select translation options" at the end of the table there and translate the pages again.

If the issue persist, I would need to take a closer look at your site. So would you please mind sharing temporary access (WP-Admin and FTP) to your site? Preferably to a test site where the problem has been replicated.

I have enabled a private reply for you to share the credentials securely, which means only you and I have access to it.

IMPORTANT: Please take a complete backup of the site first to avoid data loss.

✙ I would additionally need your permission to make a copy of the site with plugins like Duplicator and deploy it in my local machine to test the issue further.

July 3, 2023 at 5:22 pm #13935425

Subash Chandra Poudel

Thank you for the details.

I see you are using Classic Translation Editor ( CTE ) for editing the translations. Also, I see the page is built with Divi builder with Divi Widgets and since the divi widgets contents are translated as the same text segments when you update a small text in any of the widgets you need to translate the whole widgets again.

On the translation editor I see the Widgets not updated on the original page still has the same translation and is not required to translate again. So it all seems as expected.

Furthermore, I recommend you to use Advanced Translation Editor ( ATE ) over CTE to make use of new WPML features and see if it helps with the issue. You can set to use ATE from WPML -> Settings -> Translation Editor as explained in the link next. However please note when using ATE you might need to retranslate everything again on the site as CTE and ATE are not synced.

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

July 4, 2023 at 9:47 am #13939147

Mandy

Hi Subash,
thanks for your feedback.
It's very frustrating to see that the translation isn't working properly. The problem is not the Divi widgets, it's also the normal text in the page editor. Even when I use Gutenberg, the same happens.

I just tried it on a new page.
- added text in German
- saved the page
- clicked on the WPML editor icon in the sidebar
- added english text
- saved file, checked in front end - all good.
- went back to the German text, made on change in the first paragraph
- saved page
- went to the WPML editor - first paragraph is replaced again with the German text.
(you can see it yourself in the draft: page ID 21349)

I don't want to move to the ATE, it's so much extra work. Why can't we use the CTE if it's available? It does work on other websites where I use the same setup.

Mandy

July 4, 2023 at 3:55 pm #13943079

Subash Chandra Poudel

Hi Mandy,

Thank you for the updates.

However the behaviour you see with CTE is expected and that is how CTE is supposed to work.

It asks you re-translate the text or text block that has been updated.

To test if this behaviour I setup a test site which you can login to the next link:

hidden link

I did a test with the following page for example:

hidden link

and I see the same behaviour on the site.

Please let me know if I am missing something or if you see a different behaviour on the sandbox site than that of your site and I can look into the issue further for you.

July 5, 2023 at 10:11 am #13948735

Mandy

Hi Subash,
thanks for your feedback.
Yes, on your staging site it's the same behaviour. But I'm sure it wasn't like that before.
It is very inconvinient to overwrite an existing translation with the original language.
If I only do a small change on the original text, like adding a comma, it would be better if only the checkbox "translation completed" gets deactivated for this text box but the "old" translation would still show.

Now I have to go to the front page, copy the existing english text again and paste it into the translation field again (and make the tiny change if even neccessary).

I work with WPML for quite a while now and I'm sure earlier the editor did not overwrite existing translations.

And there's no way to change this behaviour?

July 5, 2023 at 5:10 pm #13953121

Subash Chandra Poudel

Hi Mandy,

I did further tests on the issue and the translations seems to stay there and only "Translation is complete" is unselected indeed! when WPML is downgraded to 4.6.3

So this bug seem to be introduced in WPML 4.6.4. I have escalated the issue to our team for further tests and verification now. I will send you an update here as soon as I have an update from the team.

The final fix for the issue even though it is verified might take some time since CTE is not actively developed so I will still recommend you to use ATE if possible.

Or you can also downgrade WPML to version 4.6.3 which you can download from https://wpml.org/download/wpml-multilingual-cms/?section=changelog in the meantime till we have an update from the team.

July 6, 2023 at 7:35 am #13955897

Mandy

Hi Subash,
thanks for your reply!
Yes, in version 4.6.3 now the editor works again as it should.
Please let me know as soon as the problem got fixed.

If there would be an easy way to switch to ATE, I would do it. But translating all the content againg for more than 120 pages and posts... that's not an option at the moment.

Thanks!
Mandy

(maybe you could remove the tag "Not WPML issue" from this topic 😉

July 6, 2023 at 1:01 pm #13960127

Subash Chandra Poudel

Thank you for confirming WPML 4.6.3 fixes the issue Mandy.

The issue is not being looked upon our team. I will let you know here if we have any workaround or news in the mean time.

I also updated ticket tag thank you for reminding.

July 7, 2023 at 5:38 pm #13969779

Subash Chandra Poudel

Hi Mandy,

The issue has now been escalated to our developers and we will release a fix for the issue in future WPML release.

In the mean time please try the following wordaround with WPML 4.6.4 and it should fix the issue:

- Backup your site completely to prevent any issues.

- Edit the file \wp-content\plugins\sitepress-multilingual-cms\addons\wpml-page-builders\classes\Shared\st\class-wpml-pb-string-translation.php
in your WordPress directory.

- Find the following 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;
	}

- And replace it with:

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;
	}

Thank you!