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.
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.
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.
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.
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?
(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.