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.

Our next available supporter will start replying to tickets in about 4.82 hours from now. Thank you for your understanding.

This topic contains 34 replies, has 3 voices.

Last updated by Alejandro 1 month ago.

Assigned support staff: Alejandro.

Author Posts
July 15, 2019 at 9:38 am #4209281

hlaingM

Hi,

I don't know how to export the custom fields from the theme. Let me know if you know how to do.

I have attached the detailed instructions on how to create custom fields and custom field values and how to incorporate those custom fields into the (ad submission) form.

Please let me know if you have any questions. Thanks.

July 15, 2019 at 9:40 am #4209287

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

I split this ticket because our previous ones were already being handled by our compatibility team for another issue and i don't want to confuse them or you.

In this ticket we will only focus on the custom fields not being correctly translated.

I'm trying to replicate the problem on a sandbox site so i can then proceed to send it to our developers.

I'll update the ticket as soon as i get to replicate the problem.

July 15, 2019 at 10:46 am #4210015

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

It's interesting that in the sandbox i couldn't even go through with the process: hidden link

The custom field appeared correctly translated in the dropdown menu (in burmese) and i couldn't go through with it because it threw the same error as with the translated state (test we did on the other ticket).

However, i could go through the entire process if i did it in the source language (English) and the custom field was correctly translated if i checked the burmese copy.

You can check it out by creating an ad in English and then by checking it out in its burmese version. or by checking this ad that was already created using your desired workflow:
hidden link

Please do check it out and let me know, because, sadly i couldn't replicate the problem on the english ad.

As soon as you answer this ticket, i'll proceed to add the fix that i suggested on the last ticket (the code that would remove the validation process of the fields) and test again, but let's go one step at a time so we can be on the same page here.

Regards.

July 15, 2019 at 11:11 am #4210131

hlaingM

Hi,

"In this ticket we will only focus on the custom fields not being correctly translated."

Thank you for your reply. The issue is NOT about the translation of the custom field values. I was able to translate both the custom field name AND the corresponding field values.

The issue is the inability of the custom "field values" (in our example those values are: people, pets & animals, items) to DISPLAY in the language the visitors choose. That sort of issue DOES NOT exist with the custom "field name" (in our example, "category"). The "category" field name has 3 custom field values (people, pets & animals, items). For instance, regardless of the language the ad posters use to post an ad, If I, as a visitor, select English, "category" will be displayed. On the other hand, if I switch on the 2nd language, "category" will be displayed as the 2nd language translation. That is NOT the case with the custom field values (i.e. "pets & animals", "items", "people")

Please see the images and re-read again to understand the issue. Thanks.

NOTE: custom field (field name) and custom field values ARE different things.

July 15, 2019 at 2:01 pm #4211939

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Sorry, i didn't explain myself properly, i meant exactly what you said..

However, i had already done exactly what you sent before, and the problem didn't exist in the sandbox.

I still need to run another test but before i continue i need you to kindly check that everything that was done is correct and that the problem is not being replicated on my end.
This is because, if i'm doind something incorrectly, then i won't be able to replicate the next test either.

In detailed, what i did was:

- I created an ad custom field called "Custom_created_CF" which would be your site's "category" custom field.

- In that custom field i added different values. one of them was "testCF".

- I proceeded to translate both the label ("Custom_created_CF") and the content ("testCF" and the others i had added).

- I created an ad in English (Source Language) using "post an ad" feature

- After i created it, i checked the burmese page for that Ad, and the problem wasn't there at all. everything was showing correctly

Here's a video of the procedure: hidden link

Can you please take a look at it and let me know if my entire procedure is correct and i'm not missing any step, please?

This will allow me to pass to the next step (the last one before i can send it to one of the developers, if needed).

Thanks

July 15, 2019 at 4:45 pm #4213421

hlaingM

Hi,

Thank you for an update. I do not see anything wrong with the steps you took in the video.

At my sites (my real site and a simple setup sandbox site), only the field name "category" displays the 2nd language. The field value "pets" does not display the 2nd language when the language is switched to Burmese. The following ad was posted in English.

hidden link

In the following case where I posted in Burmese, the ad disappears when the visitors switch the language to English.

hidden link

I do not know why it is the case. Maybe, at your site, the field values are English characters. If they were Burmese or other language characters, the same issue might appear.

Awaiting your reply. Thanks.

July 16, 2019 at 8:03 am #4217387

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

You said:

"In the following case where I posted in Burmese, the ad disappears when the visitors switch the language to English.

hidden link"

That is a problem i mentioned (and that our developers are already handling) in the previous ticket, i already troubleshot that issue and it's a semi-compatibility issue coming from the theme, so let's not focus at this problem in this ticket.

You said:
"I do not know why it is the case. Maybe, at your site, the field values are English characters. If they were Burmese or other language characters, the same issue might appear."

I don't think that's the case, i translated "testCF" to "category" written in burmese (that was the first phrase i found with that alphabet) and the problem didn't present itself:
hidden link

I did notice, though, that for some reason, whenever i posted an ad, some fields would get duplicated, and one would be assigned to the value in ad > Custom Fields, and the other would get assigned to the actual value of the ad created through "post and ad", can you check in String Translation if by typing "Pet" you find more than one string with the same content?

July 16, 2019 at 8:25 am #4217591

hlaingM

Hi,

Thank you for your response. I checked "pets" in the string translation and I see only one texts "pets". This setup which I showed you is a simple setup.

hidden link

Maybe, your setting(s) is different from mine? What settings do you think of can make the difference or can make an impact?

Thanks.

July 16, 2019 at 11:22 am #4219603

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

You can compare my settings with yours by accessing this link: hidden link

But i think the settings are pretty much the same. Try creating a new custom field with a similar name (categories) and add the pets name again and translate it in WPML > String Translation. (and add it to the form) and see how it compares with the old "category" custom field.

See if by any chance the new one works, because who knows if maybe that "category" custom field is corrupt or something like that and that's why it's not translatable.

Let me know how it goes.

July 16, 2019 at 8:17 pm #4223747

hlaingM

Hi,

I did exactly what you said. I created a new field (category2) with field values (pets,items,people). I translated "category2" and "pets". Please see below.

hidden link

Only the translation of the field name "category2" (but not of "pets") is displayed to the visitors when the language is switched to Burmese.

Thanks.

July 17, 2019 at 8:29 am #4227425

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Ok, that's weird. because i can't replicate this problem on my end.

Can you try to replicate the problem here: hidden link

And if you manage to do so, can you please list the steps you took to recreate the problem?

i have a feeling this has to do with the way the ad is created by the user, so i must be missing one step (language of the ad created, or maybe the default language of the ad or the string).

Can you try on my sandbox and tell me if you manage to recreate the problem there?

July 17, 2019 at 11:05 am #4229157

hlaingM

Hi,

So, I finished testing at your site and things look fine at your site. I am not able to reproduce the issue at your site that I encountered at my sites.

It's very wierd. Why don't you test it at my simple setup site below (sandbox)? Maybe, that will allow you to see the issue or the difference between your site and my site.

hidden link

Thanks.

July 17, 2019 at 11:59 am #4229725

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

I spotted a few things:

1) WooCommerce wasn't active on my sandbox: I activated it on my end, configured it and created a new category, added a new custom field and translated it.
everything worked correctly as you can see in here: hidden link

2) translation management is not updated to the latest version on your sandbox:
i re-registered that sandbox site and updated it.

then created a new custom field, translated it and created a new ad. and it didn't work at all.

Apart from that i didn't see anything else, so i have no idea right now what could be causing the problem.

Does this theme has any modification on it at all? or is there any custom coding on this sandbox at all?

July 18, 2019 at 5:48 am #4235113

hlaingM

Hi,

Thank you for an update. I have been getting the parent theme activated to test at the sandbox (simple setup). So there is not an interference from custom codes if there is any.

Can you think of anything else that might make a difference between your site and my sites?

Thanks.

July 18, 2019 at 7:46 am #4235797

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

The problem here is either the advanced custom fields for classipress (i'm 80% sure this is the one that causes the issue and you can try to check if by installing Advanced Custom Fields Multilingual which is a WPML Add-on fixes the issue) or CP-ADDONS.

One of those plugins is causing the issue. as soon as i deactivate them, i can see the cutom fields without issues.