Skip Navigation

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

Problem:
The client was experiencing issues with unexpected formatting markers appearing in the original text while using WPML, which were preventing the saving of translated segments.
Solution:
We advised the client to check the original content in the HTML/code editor to locate and remove any unwanted HTML markers. For translating, we suggested using the copy button in the Advanced Translation Editor to include HTML markers in the translation. If issues persisted, we recommended breaking larger text segments into smaller ones and using automatic translation to facilitate saving. Additionally, we suggested updating the page to trigger a refresh in the translation editor, which could help remove outdated formatting markers. For those preferring not to use automatic translations, switching to the Classic Translation Editor was recommended as it does not rely on automatic features.

Please note that this solution might be outdated or not applicable to your specific case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket 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 15 replies, has 2 voices.

Last updated by Bobby 2 weeks, 4 days ago.

Assisted by: Bobby.

Author Posts
October 22, 2024 at 8:34 pm #16319286

moritzv-7

Background of the issue:
I am working on a site under development and trying to complete translations using WPML. There are unexpected formatting markers appearing in the original text, which I did not include. These markers are causing issues with saving translated segments.

Symptoms:
Formatting markers such as are appearing in the original text where there are no line breaks, preventing the translated segments from saving properly.

Questions:
How can I remove or prevent these unexpected formatting markers from appearing in the original text?
What steps can I take to ensure that translated segments save correctly without these markers?

October 23, 2024 at 5:48 pm #16323043

Bobby
Supporter

Languages: English (English )

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

Hi there,

While in the Advanced Translation Editor, when adding a translation for the original string that includes the HTML marker you should be able to see an option to also add that HTML marker in your translation.

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

One "workaround" is to copy that string by using the copy button in the editor, which copies the HTML marker as well then fill out the translation.

The HTML marker is coming from the original content, please edit your page or post and review your content using the HTML/code editor to see where the HTML break is located at. Using the visual editor will not display it.

Let me know your results, please.

October 24, 2024 at 11:16 am #16325754

moritzv-7

Hi Bobby,

many thanks for your suggestions.

I was able to copy the string with the marker and paste it into the translation, then translate it, but I still can't save it although the marker does now show up in the translated string.

I also tried re-writing the original text in Colibri editor, making sure there are no line breaks in it at all. Unfortunately, in the translation editor it shows again a line break just before the end of the string at the same place as before.

I tried to switch to code editor but cannot find the tab to do so. I opened the page via the dashboard and this message shows when i try to edit in default editor - see image.

where can I find the tab to switch to code editor so that I can take the line break code out of the original string?

Many thanks for your help with this.

Moritz

Screenshot edit in default editor.png
October 24, 2024 at 7:51 pm #16328308

Bobby
Supporter

Languages: English (English )

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

Thank you for updating me!

I am not familiar with that message, but what we could do is use the plugin Yoast Duplicator, create a duplicate and test some things out on the duplicate so we don't risk the chance of losing work.

I would like to request temporary access (wp-admin and FTP) to your site to test the issue.
(preferably to a test site where the problem has been replicated if possible)

**Before we proceed It is necessary to take FULL BACKUP of your database and your website. Providing us with access, you agree that a backup has been taken **

I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/
You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you enter is private which means only you and I have access to it.

NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin.

Thank you,
Bobby

October 24, 2024 at 8:46 pm #16328449

moritzv-7

Hi Bobby

thanks for your reply, before I reply via the secure form could you please check the image to see if this is the backup I needed to take?

I don't know where the backup is stored, in case I need access down the line, and some of the information required in the secure form is beyond me. For example, what are FTP details and server protection details and where can I find them?

Many thanks,
Moritz

Screenshot backup.png
October 25, 2024 at 5:47 pm #16331909

Bobby
Supporter

Languages: English (English )

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

Hi Moritz,

yes, a duplicator backup is great, I recommend you download both files and keep them somewhere safe.

Also, of course if your site uses a different method to do a backup or even through the hosting server those are always recommended as well.

I do not forsee making any major changes or tests and if we need to it will be done off the live site, but its always a good precaution 🙂

The FTP details are for accessing the file manager, if you are not sure of them please fill free to just fill them with spaceholders like na/na for example

October 27, 2024 at 11:19 am #16334397

moritzv-7

Hi Bobby

Sorry I was away on a CPRD event. I'm now ready to send you the details required, but the secure form is no longer accessible now (when I click on the link from the previous email or the latest email it takes me just to this option here, but not the secure form).

Could you please re-send it so that I can provide the login details etc required?

With many thanks,
Moritz

October 28, 2024 at 8:43 pm #16339697

Bobby
Supporter

Languages: English (English )

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

Private reply enabled!

October 29, 2024 at 8:05 pm #16344165

Bobby
Supporter

Languages: English (English )

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

Thank you for sharing these access details!

Please verify that they are still working, yesterday I was able to login OK but today they are no longer working for me.

October 29, 2024 at 8:45 pm #16344229

moritzv-7

Hi Bobby

Yes, everything is still the same, although I noticed that I didn't need to log into wordpress - it automatically went to the dashboard, which means i was logged in for some reason.

So, I just tried to log into siteground and then wordpress, and all works fine. I made sure I am logged out of both.

Hopefully it works.

Kind regards,
Moritz

October 29, 2024 at 11:31 pm #16344428

Bobby
Supporter

Languages: English (English )

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

Correct, unfortunately the link simply tells me that I am now logged out and the siteground credentials work but I need a 2FA to get through them.

Also, when I try the wp-admin credentials it says the password is wrong.

October 30, 2024 at 9:23 am #16345627

moritzv-7

Hi Bobby

I have changed the password for wordpress, could you send a secure link again, please, so that I can send you the password?

In siteground it says that 2FA is inactive - see image. I have not set it up and never had to use it. Is it maybe that the website recognises a login attempt from another country and I wonder if using a VPN might help? But, I don't know.

Screenshot siteground 2FA.png
October 30, 2024 at 5:39 pm #16348780

Bobby
Supporter

Languages: English (English )

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

Hi there,

It prompted me to either get the 2FA by email or by texting a phone number. I am guessing yours.

Private reply activated, thank you!

October 31, 2024 at 5:27 am #16349611

Bobby
Supporter

Languages: English (English )

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

Thank you, I was able to access the site.

Accessing the "services" page translation I reproduced the issue, unfortunately, I am not exactly sure why the linebreak tag is not available, however, I was able to resolve this by doing the following:

- Broke the bigger segment, into 3 smaller ones

- ran an automatic translation

That allowed me to 100% translate it and save the translation.

NOTE: I credited the account with 100 credits to take care of the automatic translation done by me while testing this.

October 31, 2024 at 11:38 am #16351121

moritzv-7

Hi Bobby

Many thanks for the suggestions. I tried translating the entire Services page and after inserting line breaks into the translation I managed to eventually save them.

However, these line breaks now show on the German version of the website - see image below.

The issue is that these line breaks should never have been there in the first place - i.e. in the original text. Inserting them into the translation destroys the appearance. So, unfortunately this is not a solution.

How did you "break" the translation segments? Did you do this in the source or in the target language segment, and how? I cannot see anything on the editor that allows me to break segements into smaller ones, and google research did not produce any solutions.

I may have to go into the code to remove the line breaks in the original segments that should not be there - how do I do that? All methods I have tried have not worked.

Another longer term issue is that I do not want to use automated translation because it simply is not good enough. As a translator I need to showcase best practice on my website in order to attract business, not mediocre machine translated stuff. As such, I don't need and don't want to pay for machine translation via credits, I can do all that myself.

With kind regards,
Moritz

Screenshot German example line breaks.png