Skip Navigation

[Resolved] Content Template displays incorrectly in secondary language after translation

This support ticket is created 2 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 8 replies, has 2 voices.

Last updated by simonM-5 2 years, 2 months ago.

Assisted by: Minesh.

Author
Posts
#2286275

Dear Support

For some reason translating a Content Template has resulted in its layout displaying incorrectly in our secondary language German.

I recently translated all Content Templates from EN to DE and revised the whole site for faulty translations and corrected all English strings to German strings where appropriate.

Everything appears to be OK except for the layout for viewing the post type Message in German.

The layout should be given by the simple Single Post Elementor Template "Single Post - Messages" and the Content Template "Toolset > Content Templates > Message - single" (ID 1252) . It works fine in English but switching to German adds loads of extra space, like it is completely ignoring the CSS.

I have tried re-saving the Content Template "Toolset > Content Templates > Message - single" (ID 1252) and have tried revisiting and making minor changes to the translation by adding spaces or something so it would recognise a "new" version, but that isn't helping either.

I've also cleared the WP Rocket cache after any changes and cleared the browser cache and using only private windows to ensure it's not some cache issue.

Can you please help figure out what is causing this layout problem? It works fine for the "Job Ad - single" and "Nanny Ad - single" Content Templates and they were created in Elementor using the same principles and settings, only difference is the Post Title block is missing in "Single Post - Messages".

To reproduce the issue easily, you could use the following login (please remove once noted):

1) Click on the Chat icon in the menu
2) Open a message by clicking the name, eg click on Siobhan Smith
3) Switch to German - the layout gets screwed up.

Thanks and kind regards
Simon

#2286667

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I checked the page source for the following page:
=> hidden link

view-source:<em><u>hidden link</u></em>

If you see the page source I can see there are number of <br /> tags added and due to that those unwanted space is get displayed. Can you please investigate within you code from where those <br /> tags coming from.

#2286719

HI Minesh

Thanks for that insight.

I think there is a problem with the translating of the Content Template. When I click the pencil icon beside the Content Template 1252 Message - single, I'm seeing old code, even in English. I think an outdated version is being displayed.

Shouldn't the code being presented for translation be identical to what we see in English if we edit the (original English) Content Template?

The English version seems to be using Gutenberg blocks as well, which I don't use.

That version of the German version with all the br tags in it appears outdated to me and should be identical to the English version.

Kind regards
Simon

#2286759

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please share the problem URL of the content template and admin access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2286823

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I've removed the spaces from your content template:
=> hidden link

I can see most of the <br /> tags which was added is gone. Can you please check.

#2288129
Screenshot 2022-02-09 at 21.55.11.png
Screenshot 2022-02-09 at 21.56.23.png
Screenshot 2022-02-09 at 21.57.19.png
Screenshot 2022-02-09 at 21.57.50.png

Hi Minesh

Thanks for that, it certainly helped. I also changed some CSS now to get the box to fill out the space.

(1) However, there is still a <p> </p> in the German version when I look at it in Safari inspector, which isn't there in English, causing a gap between the box where you can enter the message and the chat container box itself in the German version (we don't want that gap either).

(2) I still see two extraneous br tags in the German version, just above where it says "Fragebogen zum Nanny-Interview"

(3) The two gaps on the lefts and right sides of the page body at the screen's edge have now disappeared too (which is a good thing!), BUT I didn't change anything with regard to this, so do not know why they have disappeared. ?!? 🤷🏻‍♂️

This is a little frustrating as you can imagine, because I get the strong impression the tool is not reacting correctly.

For example, if I try to enter edit the Content Template in German, Toolset tells me to edit it in the WPML Translation Manager. There I see the pencil icon as if the original and translation are "complete". But if I click the pencil icon to translate the Toolset > Content Templates > ID 1252 and then click "Show differences" it shows me differences (see screenshot). I tried removing all the German version and replacing the entire text, but the next time I go in and "Show differences" the difference is still there! (see screenshots)

So I guess my questions are:
1) How are you managing to force edit those changes in the German version and end up with two (slightly) different EN and DE versions?
2) Why isn't the translation working as it should?
3) Is this template somehow corrupt?

Thanks and kind regards
Simon

#2288683

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

(1) However, there is still a <p> </p> in the German version when I look at it in Safari inspector, which isn't there in English, causing a gap between the box where you can enter the message and the chat container box itself in the German version (we don't want that gap either).
==>
I've fixed that by adding the following CSS:

.elementor-widget-container p { margin-bottom:0px; }

(2) I still see two extraneous br tags in the German version, just above where it says "Fragebogen zum Nanny-Interview"
==>
I do not see it now, I've removed the spaces from there and it seems those br tags also removed.

(3) The two gaps on the lefts and right sides of the page body at the screen's edge have now disappeared too (which is a good thing!), BUT I didn't change anything with regard to this, so do not know why they have disappeared. ?!? 🤷🏻‍♂️
==>
I'm not sure what edges you mean, I just removed the all spaces from the content template and it seems that is responsible to fix that issue.

So I guess my questions are:
1) How are you managing to force edit those changes in the German version and end up with two (slightly) different EN and DE versions?
==>
I only edit the following content template:
- hidden link

2) Why isn't the translation working as it should?
==>
what translation is not working? Can you clarify?

3) Is this template somehow corrupt?
==>
I do not think but then if you want, you should try to give a try to build another test content template and translate it and see how it behaves as the content template outputs the correct values, it seems working.

#2288891

HI Minesh

We tested our messaging system and we are happy that it's working the way we need it to now.

Thanks for your help!

Kind regards
Simon

#2288893

My issue is resolved now. Thank you!

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