Skip Navigation

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

Problem:

[Elementor] Visual/Text toggle removes paragraph tags on translations and shows on one line

Solution:

This issue is already fixed with the latest versions of WPML.

Please update our plugins to their latest versions.

**** Important! Please make a full site backup (files and DB) before you proceed with those steps****

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

Last updated by Itamar 1 year, 4 months ago.

Assisted by: Itamar.

Author Posts
April 29, 2022 at 6:08 am #11119445

br.-nirmalanandaY

Link to actual English Page: hidden link

Link to Translation of this page: hidden link

One can see on comparing the English and translated pages that line breaks have disappeared in the translated language.

Snapshots are attached below for further reference.

It has been observed that rolling back to previous version such as 4.5.2 and 4.5.3, the issue disappears. The issue starts coming with version 4.5.4 and onwards.

Please look into it as soon as possible.

ध्यान-का-मार्ग-क्रियायोग-–-YSSIT-WPML-Test-Instance - Hindi.png
WPML-Test1-–-YSSIT-WPML-Test-Instance - English.png
April 29, 2022 at 11:08 am #11121967

br.-nirmalanandaY

Hi, Is anyone there to look into the issue?

April 30, 2022 at 6:55 pm #11127061

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

I have created a test site with Hello Elementor, Elementor, and WPML here:

One-Click-Login:
hidden link

Could you please try to recreate this issue and then get back to me?

Best regards
Andreas

May 4, 2022 at 4:40 am #11146059

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

The behavior is expected, as when using the Classic Translation Editor you handle HTML output and your translation is missing the HTML markup.

In order to avoid such issues, you might consider using the Advanced Translation Editor which does not output HTML.

How to enable the ATE:
https://wpml.org/documentation/translating-your-contents/advanced-translation-editor/

Let me know if you do have any questions regarding this.

Best regards
Andreas

May 4, 2022 at 12:01 pm #11150677

br.-nirmalanandaY

Dear Andreas,

Thank you for your reply.

I am still unable to get it. Why should it happen in the first place? Earlier this issue wasn't there. When I updated the plugin to its latest version 4.5.5, this issue started coming which means there is something in the update which is causing this to happen?

We don't use ATE for our organizational website. Would you suggest some other way to solve the probelm using Classic Translation editor?

Thanks.

May 4, 2022 at 6:46 pm #11153971

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

It does not look like a WPML issue to me, as it only occurs on some translated content, not all.

You are using the Classic Translation Editor which includes HTML markup and your translated content is missing the HTML markup.

You only need to make sure to use the same HTML structure on your translations and the line breaks work, as you can see on other translated contents.

In your example the translations is missing the HTML paragraph markup

<p>Some text here</p>

Please let me know if something is still unclear about this workflow.

Best regards
Andreas

May 5, 2022 at 8:27 am #11157609

br.-nirmalanandaY

I am trying to use the Advanced Translation Editor now as suggested by you.

Now, when I am trying to add translation to an existing page, it is showing an error which is as follows:

"WPML didn't manage to translate this page.
Try again"

Would you please have a look?

Thanks

May 5, 2022 at 2:56 pm #11160861

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Please complete the dialog shown in my screenshot.

The ATE should operate after that. If not, please let me know.

Best regards
Andreas

dialog.png
May 10, 2022 at 6:25 am #11186103

br.-nirmalanandaY

Dear Andreas,

I tried the ATE that you had suggested in the previous thread. After moving a couple of steps, I found out that the use of ATE doesn't suit the needs of our organization which I had told earlier also. It is so disheartening to see that the problem has been open for so long and I am unable to receive the much-needed support from you/WPML.

To summarize so that you have a clear idea of the issue:

On our website, earlier we were using the 4.5.2 version of the WPML Multilingual CMS plugin. Until that time, everything worked perfectly fine.

Couple of weeks back, we upgraded to the 4.5.5 version and it started creating the issue. Even the recently released version 4.5.6 still has that bug. I am quite surprised to see that you are not incorporating the solution to this bug in the coming updates.

Whenever a new page is getting translated or existing page is being modified, all the line breaks disappear. This was not the case with version 4.5.2.

For your reference, I have created a test page and translated it into 5 different languages. Each of the language pages has been translated with a different version of the WPML Multilingual CMS Plugin (as is evident from the heading of the language page) ranging from version 4.5.2 until 4.5.6.

Please have a look that the issue which I mentioned above is coming in all the versions except 4.5.2.

Please provide a fix to this issue at the earliest. If it is taking time for you, I would request to escalate the issue to another tier.

In case, the issue is still not clear to you, please let me know how to connect with you so that we can discuss this further.

Looking forward to your immediate reply.

Thanks!

May 10, 2022 at 4:15 pm #11191511

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

Andreas is not available today so I'll continue to handle this ticket. I hope that it is alright with you.

I've read the entire thread and now I'm checking the issue on your site and will get back to you when I have more information about this issue.

Thank you for your patience.
Itamar.

May 10, 2022 at 5:50 pm #11192129

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi again.

After further investigation, I've found out that the issue you are experiencing on your site is a known issue that we have. It was already reported to us and escalated to our developers. We also published an errata page on this issue with a workaround. Please read about it here.

https://wpml.org/errata/visual-text-toggle-removes-paragraph-tags-on-translations-and-shows-on-one-line/

What you need to do is the following.

1. Take a backup of your site in case something goes wrong.

2. Edit the functions.php file of your theme, and at the end of the file, ad this code and save the changes.

/**
 * Fix for Visual/Text toggle removes paragraph tags on translations and shows on one line
 */
add_filter('tiny_mce_before_init', function($config) {
    if ( defined('ELEMENTOR_VERSION') && did_action('admin_init') && get_current_screen()->id === 'wpml_page_tm/menu/translations-queue') {
            $config['wpautop'] = false;
    }
     
    return $config;
});

3. Edit the translations with the Classic Translation Editor and add the line breaks again. This will add the HTML <p> tag, which was missing because of this problem. Make sure the translation is 100% complete.

Check the front end and see that now the problem is fixed. I've already tried it on your site to confirm it is working. You can see it in the Hindi translation here.

hidden link

Please also see the attached screenshot.

I've added this ticket to our internal documentation about this issue, and when our developers release a version with the fix for this issue, I'll update you here.

Regards,
Itamar.

2022-05-10_20-40-00.jpg
November 10, 2022 at 3:23 pm #12431997

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

This issue is already fixed with the latest versions of WPML.

Please update our plugins to their latest versions.

**** Important! Please make a full site backup (files and DB) before you proceed with those steps****

I'm closing this ticket. Don't hesitate to contact us again with any WPML issues or questions.

Regards,
Itamar.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.