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.

This topic contains 18 replies, has 2 voices.

Last updated by Radu 2 months ago.

Assigned support staff: Radu.

Author Posts
July 23, 2019 at 12:39 pm

niklasP-6

I am trying to: Translate text that have a list inside.

Link to a page where the issue can be seen: hidden link

I expected to see: List should not get rn and rnt added to the text.

Instead, I got: I got lists with rn and rnt if i check the code they have <p> around them.

This only happens when I translate the original page does not have this.

July 23, 2019 at 2:07 pm
July 24, 2019 at 9:05 am #4271967

Radu
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hey Niklas,

I created the helpdoc CPT on my website and the lists are working fine on both languages. There's only one more particularity on your website: the content is added inside of a Help Doc Main block. Can you tell me how did you create it, please? Also, can you try to create a new helpdoc, use default block, create the translation, and tell me how things work this time, please?

Thanks,
Radu

July 24, 2019 at 10:53 am #4273549

niklasP-6

Yes the "Help Doc Main Block" is a ACF Gutenberg block. Most of the fields area here.
hidden link

The field "column1_group" and then beneath that the field "innehåll"(id "column"). That field is a flexible content field. So it contains alot of different content types. The one we are using is text. The block file is here. theme/wp-bootstrap-starter-child-master/template-parts/blocks/helpdoc/helpdocmainblock.php Most of the code is withing function.php

July 24, 2019 at 1:50 pm #4275351

Radu
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hey Niklas,

I'm trying to replicate this issue on my website by copying the block you created on your side. I finally managed to understand the hierarchy of fields and how are they working. There's only one more thing that I need help with. Where can I find the Help Doc Main block that you set on the location rule? I checked this page hidden link but I couldn't find that block so I can assign to the rule. Is there any other place I should check? I want to create it on my side, translate the block, and see how things work for me.

Thanks,
Radu

July 24, 2019 at 3:10 pm #4276051

niklasP-6

Are you talking about the php file? If so this is the file.

themes/wp-bootstrap-starter-child-master/template-parts/blocks/helpdoc/helpdocmainblock.php

Think you can edit/view it from here.
hidden link

If the question is where it is for use. You can find it under HelpDoc and add a gutenberg block Its in the folder Help Desk -> Help Doc main block

July 24, 2019 at 3:13 pm #4276057

niklasP-6

If the question was what ACF group it is... Then you can find it here. (Helpdocs block)
hidden link

column2_group, column3_group, column4_group, column5_group is clones of column1_group. So when i do changes i do it in "column1_group"

July 24, 2019 at 3:31 pm #4276113

niklasP-6

A good idéa to se whats going on could be to check the database directly after the translation is made/saved. Compare the two strings. then we know if it happens when its being rendered or if it happens when it's being saved. I dont know where to look but if you like to check on my site there is a php MY admin plugin that you can find in the menu. You can login there without a password.

July 24, 2019 at 3:39 pm #4276159

niklasP-6

I found it in the Database. I compared the English and the Swedish version. The content looks the same, there is no more hidden characters or anything. So I guess that means its when its being rendered.

July 24, 2019 at 3:45 pm #4276241

niklasP-6

In functions.php on row 841 i'm using get_sub_field('text') to get that content and render it. I dumped that content and it looks like the content coming from that get_sub_field('text') is wrong so it's nothing in my functions that create this problem. Also, my files are doing the same thing to both Swedish and English text.

July 29, 2019 at 9:02 am #4297989

Radu
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hey Niklas,

Could you create a duplicator package and send it to me so I can create a copy of your website and check this a bit closer? I just want to be able to check everything that you mentioned in your last few messages and see what's going on. If I'll be able to replicate this one on a clean install, I'll definitely escalate it to the development team to find a fix.
Here's an article where you can find a few more details about how to create this package: https://wpml.org/faq/provide-supporters-copy-site/. You can give me a heads-up once the package is done so I can go to the dashboard and download it.

Thanks,
Radu

July 29, 2019 at 9:29 am #4298167

niklasP-6

Ok I downloaded the duplicator and created a package. You can go and download it now. thanks

July 30, 2019 at 10:46 am #4306999

Radu
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hey Niklas,

I was able to download the duplicator package and create a copy of your website on my computer. Now I'll check things out and come back to you with a new message.

Thanks,
Radu

August 1, 2019 at 10:58 am #4320847

niklasP-6

Any news on this ticket?

August 7, 2019 at 2:16 pm #4355903

niklasP-6

Hi Radu, dont know if Lauren gave you my findings around this problem?

The topic ‘[Closed] Trying to translate UL LI list and OL LI list’ is closed to new replies.