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.

Sun Mon Tue Wed Thu Fri Sat
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -
- 19:00 – 22:00 19:00 – 22:00 19:00 – 22:00 19:00 – 22:00 19:00 – 22:00 -

Supporter timezone: Asia/Kathmandu (GMT+05:45)

This topic contains 3 replies, has 2 voices.

Last updated by Subash Chandra Poudel 8 months, 2 weeks ago.

Assisted by: Subash Chandra Poudel.

Author Posts
August 9, 2023 at 9:30 pm #14178551

billL-7

We're using WPML with the X Theme and Cornerstone plugin. The site has an old version of X Theme and Cornerstone, but the issue we're seeing is when saving a post in Cornerstone the `_last_translation_edit_mode` field is being switched from `native-editor` to `translation-editor`. This is causing WordPress to display the non-translated post_content instead of the translated Cornerstone content (which is saved in a wp_postmeta) field.

Any setting we can change to make sure WPML never changes the `_last_translation_edit_mode` meta field to `translation-editor`. No content on this site is edited or translated with the WPML translation editor. Content is copied to the translated version of the page and manually translated in the Cornerstone editor.

August 11, 2023 at 6:45 am #14185987

Subash Chandra Poudel

Hi there,

Welcome to WPML Support.

You said "...when saving a post in Cornerstone the `_last_translation_edit_mode` field is being switched..." also you said "..Content is copied to the translated version of the page and manually translated ..."

Can you please let me know more details on what exactly causes the issue? The issue is when you edit and update the primary post? Or is it when you edit/update the translated post?

Since you said you are manually translating the posts please take a look to the following document on how to properly translate content manually with WPML and see if it helps.

https://wpml.org/documentation/translating-your-contents/using-different-translation-editors-for-different-pages/

Also, please go to WPML -> Settings page scroll to "Custom Field Translation" section then click on the "Show system fields" link. Now, search for "_last_translation_edit_mode" and verify it is set to "Don't translate".

Let me know how it goes or if you need further help with the issue.

Regards,
Subash

August 11, 2023 at 3:34 pm #14189663

billL-7

I did some more testing and the issue arises when the translated page is saved in Cornerstone. Despite being set to be translated independently and being saved from the Cornerstone editor the `_last_translation_edit_mode` field value switches from `native-editor` to `translation-editor` on the translated page post ID.

So let's say we have default (english) and translated (spanish). Spanish is created as a duplicate of English and switched to be translated independently and manually translated via the Cornerstone editor. The Spanish post is edited and saved and the `_last_translation_edit_mode` is set to `native-editor` manually.

Later on someone goes to edit the Spanish page via the Cornerstone editor. They save their edit and WPML switches the `_last_translation_edit_mode` back to `translation-editor`.

Then when the English page is updated in Cornerstone, the `_last_translation_edit_mode` being set to `translation-editor` on the Spanish page causes the Spanish to display English content from the post_content field instead of the cornerstone_data that is saved in wp_postmeta for the ID.

The `_last_translation_edit_mode` field is set to Don't Translate.

CleanShot 2023-08-11 at 09.10.00@2x.png
August 13, 2023 at 10:38 am #14192859

Subash Chandra Poudel

Thank you for the updates with the details.

I tried to replicate the issue on a test site but I was not able to see the issue probably I am missing some steps or processes that you follow.

Can you please try the following and let me know how it goes along with the exact steps you follow?

- Login to the test sandbox site that I setup for you using the link next.
hidden link

- Setup WPML on the site ( a site key will be provided automatically during the setup ), use minimal setup only, or set only the required options.

- Install your theme/plugins on the site and set them up. Again use as minimal plugins, setup, and process as possible so as to keep the test simple and make it easier to troubleshoot the issue.

- Try to replicate the issue on the site and see if it is replicable here or not. This will help us verify if the issue is specific only to your site or is replicable on any site.

If the issue is replicable here, please let me know the steps for me to see/replicate the issue at my end.

The topic ‘[Closed] Updating page in Cornerstone causes _last_translation_edit_mode to be incorrect’ is closed to new replies.