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.

Hi, Amit here, I am the WPML Support Manager, please make sure you are using the latest WPML 4.3.16 before reporting an issue, thanks!

This topic contains 16 replies, has 2 voices.

Last updated by Itamar 1 week, 1 day ago.

Assigned support staff: Itamar.

Author Posts
May 29, 2020 at 11:03 pm #6253241

nicholasA-4

Hello WPML Support Team,

I have a problem translating custom fields. Every time I translate them but then update the original post again in the default language the translation is lost. I looked through many other support tickets and tried a lot of things but I am pretty much clueless at this point. I am using Toolset in combination with WPML.

I can give you access to my site if you like so you can take a look.

Thanks for your help.
Nick

June 1, 2020 at 10:44 am #6264671

Itamar
Supporter

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

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

Hi, Nick.

I couldn't replicate this issue on my WPML-Toolset test site. Please make sure that all of our plugins are updated to their latest versions on your site. And also please make sure to follow our documentation here.
https://toolset.com/documentation/translating-sites-built-with-toolset/translating-the-content/
https://wpml.org/documentation/getting-started-guide/translating-custom-fields/

If you need more help from me please share with me the access to your site and explain to me where and how to see the problem on your site.

If you need further help with this, please share the access details to your site with me.
I'm enabling a private message for the next reply.

Privacy and Security Policy

We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

**IMPORTANT**

- - Please make a backup of site files and database before providing us access. --

Thanks,
Itamar.

June 4, 2020 at 9:31 am #6291735

Itamar
Supporter

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

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

Hi and thanks for the access details.

I'm sorry but I could not access you test site. When I go here hidden link I get a 404 page. Please see the attached screenshot.

Can you please check and correct this issue?

Thanks,
Itamar.

June 4, 2020 at 10:12 am #6292195

nicholasA-4

Sorry I missed a c there. The page is: hidden link

June 7, 2020 at 4:16 pm #6315311

Itamar
Supporter

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

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

Hi and thanks for the access details.

First, it is important for me to mention that it seems you did not give me an administrator user and therefore, I couldn't inspect your site's settings of Toolset and WPML.

You gave me the following description on how to replicate the problem on your site:

Please visit both posts in individual tabs. Try changing a custom field in the /de post and update it. Then go to the English post and update it as well. Lastly, refresh the german post and you'll see that all custom fields are gone on the frontend. You can try this over and over again it will happen every time.

From your description, I could already guess that you are not following our documentation on how to work with Toolset's custom fields and WPML. I sent you to that documentation in my first reply here.
https://toolset.com/documentation/translating-sites-built-with-toolset/translating-the-content/
https://wpml.org/documentation/getting-started-guide/translating-custom-fields/

When I use WPML's Translation Editor to translate the English (default language) custom post type Campaign "Toolset Test" everything works as expected. The custom fields are being translated into German. Please see the attached screenshots.

Please let me know if you have questions about how to work correctly with WPML and Toolset's custom fields.

Regards,
Itamar.

June 9, 2020 at 2:33 pm #6332539

nicholasA-4

Hi Itamar,
sorry about that. That should be fixed now and you can see the full admin.

Yes sure. The custom fields are translated with the WPML's Translation Editor but can you try one thing for me and change a custom field in the primary language and then click on update again?

In my case, the german translations of the custom fields are gone after that. Does the same thing happen for you?

Regards,
Nick

June 11, 2020 at 1:43 pm #6351463

Itamar
Supporter

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

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

Hi, Nick, and thanks for changing my user to be an admin.

Yes, I can see that once I press the Update button of the English Toolset Test WPML Campaign post, the content of the custom fields is disappearing from the German translation. Nevertheless, once I updated the German translation again in WPML's Translation Editor, it is back on the front-end.

I've checked many things on your site but couldn't solve this issue so far or understand the source of it. I saw a few things that I suspected of causing this problem. But after some checking, I found out that they are not what is causing the issue. Here is what I checked.

1. In WPML -> Languages, I could see that you have selected the Language URL format option of Different languages in directories with the option Use directory for default language. But you didn't set a homepage or an HTML file as required. You can read more about it in our documentation here.
https://wpml.org/documentation/getting-started-guide/language-setup/directory-default-language/
But disabling the Use directory for default language option didn't solve the issue.

2. Also, there seems to be a general problem with setting the option of Different languages in directories on your site. Please see the attached screenshot folders-ng.jpg. You can read more about it here.
https://wpml.org/documentation/getting-started-guide/language-setup/cannot-activate-language-directories/
But when I switched to the option Language name added as a parameter and saved the permalinks the problem persisted.

3. I could also see that you have a kind of unusual custom base permalinks structure for Campaign. It was only /c/. Please see the attached screenshot custom-base.jpg. So I was wondering if this caused the issue. Therefore I changed the slug to 'campaign' and in WPML -> Settings -> Post Type Translation, I translated it into German like this 'kampagne'. But this didn't solve the issue either.

Edit: I switched all the settings that I changed back to what they were.

At this point, I suspect two things to be the cause of the issue.

1. A compatibility issue with one of the plugins or the theme that you are using.

2. That something in the quite complex custom fields structure where six fields groups are assigned to the Campaign post type. Maybe there is some kind of collision or wrong setting or condition that is causing this problem. And for this, it would be very hard for me to realize where the issue is coming from. You probably know better than me how you have structured things there.

So, for now, I want to suggest to continue debugging this issue with step number one. Please proceed as follows. I suspect that there is a collision with the theme or another plugin that might cause this problem. If possible get your site into a minimum environment. Minimum environment means switching to a default WordPress theme like Twentytwenty and no plugins activated except WPML and WooCommerce itself. You will need first to check if the problem persists when just the theme is switched to Twentytwenty (for example). If it persists then deactivate all plugins except the WPML and its add-ons and WooCommerce itself (without any of its extensions). Then please check if the problem persists. If it does not persist so start by activating the plugins one by one and check when the problem comes back, then report to me which was the culprit plugin.

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


*** If your site is a live site you might want first to try those procedures in a staging environment or a snapshot of your site on your local server or another server. ***

Thanks,
Itamar.

June 14, 2020 at 6:56 am #6366803

nicholasA-4

Hi Itamar,
thank you for your help.

Ok, we'll try debugging the issue further according to your instructions.

Regards,
Nick

June 15, 2020 at 8:50 am #6371307

Itamar
Supporter

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

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

OK, Nick, I'll wait to hear from in case, you need further help.

June 22, 2020 at 6:28 am #6423437

nicholasA-4

Hi Itamar,
we still need more time debugging the issue. We tried many things but couldn't trace the root cause, yet. I'll keep you posted.

Regards,
Nick

June 23, 2020 at 6:38 pm #6437483

Itamar
Supporter

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

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

Sure, Nick, I'll wait for your reply.

June 29, 2020 at 4:42 pm #6479247

nicholasA-4

Hi Itamar,
I continued debugging the issue and did everything you mentioned.

I installed a default theme (twentytwenty) and deactivated all unnecessary plugins + I upgraded all necessary plugin to the latest version.

At the moment I only have the following plugins active:

-Classic Editor
-Toolset Types
-WooCommerce
-WooCommerce Multilingual
-WPML Multilingual CMS
-WPML String Translation
-WPML Translation Management

Then I ran a test again and noticed that the custom fields still disappear when the primary post is saved.

Please try for yourself.

If you save this post.
hidden link

the custom fields will be lost from this post:
hidden link

You will notice it in the admin that the content of the custom fields suddenly disapeared.

I used one of the following field to test it: Wpcf-raffle-campaign-title-1

I feel like the problem is with toolset types and WPML what do you think?

Regards,
Nick

June 30, 2020 at 10:34 am #6484897

Itamar
Supporter

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

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

Hi, Nick.

I can see this issue on your site.

But this is the expected behavior because the Wpcf-raffle-campaign-title-1 field is set to 'Translate'. Please see the attached screenshot. So when you update the original post the translated post is waiting for translation for this field. Please read more about translating custom fields in our documentation here.
https://wpml.org/documentation/getting-started-guide/translating-custom-fields/

Regards,
Itamar.

June 30, 2020 at 8:42 pm #6489955

nicholasA-4

Hi Itamar.

But how can this be the expected behavior?

I added content to this field on the primary post and then also translated this field on the translated post. When I update the primary language post again however the content of the field in the translated language is suddenly gone.

Did you try this exact same thing?

How can the translated post be waiting for translation if that was already there?

Do you mind added content to the Wpcf-raffle-campaign-title-1 filed in the primary language and then after that please also add content to Wpcf-raffle-campaign-title-1 of the translated post. finally update the original post again. Notice that the content of the Wpcf-raffle-campaign-title-1 in the translated language is suddenly missing?

July 1, 2020 at 9:45 pm #6499171

Itamar
Supporter

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

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

Hi and thanks for the extra details.

I can see this custom fields missing value issue on your site. I'm consulting our second tier supporters regarding this issue and I'll update you here.

Thank you for your patience.
Itamar.