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 9 replies, has 1 voice.

Last updated by Otto 2 weeks, 5 days ago.

Assisted by: Otto.

Author Posts
May 6, 2025 at 1:52 pm #17002125

HANS

Background of the issue:
I am trying to address an issue where translations are sometimes overridden with content from the original language. This issue occurred once immediately after restoring a revision. We noticed that some Gutenberg blocks have the "translatedWithWPMLTM" attribute added when this happens.

Symptoms:
Translations are overridden by original language content, and this issue is associated with the "translatedWithWPMLTM" attribute in some Gutenberg blocks. The issue is not consistently reproducible.

Questions:
Why are translations being overridden by the original language content?
What causes the "translatedWithWPMLTM" attribute to be added to Gutenberg blocks?

May 6, 2025 at 3:40 pm #17002701

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

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

Hi,

Can you check this?
https://wpml.org/errata/editing-translated-posts-directly-can-result-in-lost-content/

Does any of these scenarios match your workflow?

May 7, 2025 at 8:07 am #17004851

HANS

These scenarios don't exactly match our workflow.
Although I think our problem may have to do with users editing translated posts directly via the WordPress editor and not the translation editor.

One circumstance, which I think often leads to this problem, is that the link in the post/page list view (the title of the post and the link marked "Edit") always links to the WordPress editor, even though the language chosen in the admin bar is not the original language for the post.
How is the user supposed to know which link to click in the list view, without falling into the trap, that the translated posts' post_content is edited directly and later the translation editor overrides it?

May 7, 2025 at 2:33 pm #17007160

Otto
WPML Supporter since 09/2015

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Yes, that should be the root cause of the problem. Mixing editors is not recommended.

When you open a translated page this way:

... the link in the post/page list view (the title of the post and the link marked "Edit") always links to the WordPress editor, even though the language chosen in the admin bar is not the original language for the post.

there is a warning message. Does it appear on your site?

Best Regards,
Otto

May 15, 2025 at 7:08 am #17035211

HANS

"there is a warning message. Does it appear on your site?"

When editing a translation with Gutenberg, we don't see any warning.
Could you please provide a screenshot, where I can see the warning?
I'd really like to find out, why this is not working for us.

May 15, 2025 at 11:43 am #17036663

HANS

We found the issue.
The problem was, that the wp option `wpml_dismiss_post_edit_te_notice` was set.
Older versions of WPML used that option to disable the warning via a checkbox in the warning dialog.
At some point the checkbox was hidden via styles but the logic to disable the warning remains in place.
That should have been removed completely.
The old implementation wasn't sane anyways because there was no way provided to un-hide the warning.
The only way is to read the WPML source, discover the option name and delete it manually.
But that is only possible for persons who are able to understand the WPML source, so that's a really bad UX.

May 15, 2025 at 1:30 pm #17037087

HANS

There's still another issue with a different warning.
When opening a translation in Gutenberg, where the status is "is_waiting_for_a_translation", we don't see any warning.
In this case WPML renders the template "translation-in-progress.twig", but we can't see the warning message in Gutenberg.
Judging from the content of the template file, the issue is, that its markup is not yet compatible with Gutenberg.
Can you confirm that?

May 15, 2025 at 2:12 pm #17037334

Otto
WPML Supporter since 09/2015

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

I can confirm that when you edit a translated page using Gutenberg that is waiting for a translator, the warning does not appear.

I'll escalate the issue to our second-tier support so it can be fixed in future releases.

Thanks for reporting the issue.

Best Regards,
Otto

May 16, 2025 at 6:28 am #17039437

HANS

Hello Otto,

thanks for your help 😄👍️
I'll close the Issue now.

Kind Regards,
Simon

May 26, 2025 at 12:59 pm #17073425

Otto
WPML Supporter since 09/2015

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Just to let you know that the issue has been escalated to our development team and will be addressed in future versions.

If you need this solved immediately, you can try this workaround:
❌ Please make a full website backup before proceeding ❌
go to: /wp-content/plugins/sitepress-multilingual-cms/templates/notices/post-edit/translation-in-progress.twig
Replace the value there with:

<div id="popupWarning" style="display:none; position:fixed; top:20%; left:50%; transform:translateX(-50%); background:#fdd; border:1px solid #f00; padding:20px; z-index:9999;">
    <p>{{ warning|raw }}</p>
    <button onclick="document.getElementById('popupWarning').style.display='none';">Close</button>
</div>

<script>
    document.getElementById('popupWarning').style.display = 'block';
</script>

Best Regards,
Otto