Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing issues with ACF fields not maintaining consistent category assignments across different languages in a WPML environment. Specifically, when adjusting categories in one language, they appear random or default to the first alphabetical categories in another language.
Solution:
1. Ensure all categories are correctly translated under WPML > Taxonomies translation.
2. In the default original language, adjust the field group's settings to have "identical fields on all languages".
3. Create a new post or page and assign it to one of the categories listed in the ACF group configuration. Save and check if the field displays on the original language post.
4. Duplicate or translate the post to a second language and verify if the fields are visible and if the correct category is assigned.
If these steps do not resolve the issue, we recommend trying to replicate the issue on the provided sandbox environment. Additionally, please ensure that you have the latest versions of all themes and plugins installed. If the problem persists, it might be due to an outdated solution or a different issue. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix. If necessary, please open a new support ticket at WPML support forum for further assistance.

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 9 replies, has 3 voices.

Last updated by az-agrC 1 year, 9 months ago.

Assisted by: Ilyes.

Author Posts
August 2, 2024 at 1:05 pm #16033633

az-agrC

Background of the issue:
I need help with ACF and WPML on my site hidden link. I have referred to the documentation at https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/.

Symptoms:
No specific issue or error message mentioned.

Questions:
Please see previous chat

August 2, 2024 at 2:04 pm #16033833

Ilyes
Supporter

Languages: English (English ) French (Français ) Arabic (العربية )

Timezone: Pacific/Easter (GMT-06:00)

Hello,

I would like to ask for temporary access to your staging site’s wp-admin and FTP to investigate the issue further.

Kindly provide me with the steps on how to replicate the problem.

It is important to note that you should back up your site and database before proceeding, and you can use a plugin like Duplicator for this purpose. Here’s a link to the plugin: http://wordpress.org/plugins/duplicator/

If you do not see the form below, please do not enter your credentials, as they will be publicly exposed:

hidden link

For your privacy and security, please ensure that you make your reply a private one.

Best regards,

August 2, 2024 at 9:46 pm #16034919

Ilyes
Supporter

Languages: English (English ) French (Français ) Arabic (العربية )

Timezone: Pacific/Easter (GMT-06:00)

Kindly provide me with the steps on how to replicate the problem.

I do not see the error you are referring to,

August 5, 2024 at 9:04 am #16038358

az-agrC

Go to ACF field "Scheda cavallo" while in italian

Scroll to locations rules

see 2 different categories (in italian) in which this field applies

now go back to filters and switch to english

enter the same "Scheda cavallo" and scroll to locations rules at the bottom

see 2 random categories selectes (alphabetically the first 2).

if you fix them in english, they go random in italian.

we need to be able to apply the group to specific categories (the same, not different ones) in both languages.

How can we achieve that?

August 7, 2024 at 1:13 am #16045919

Ilyes
Supporter

Languages: English (English ) French (Français ) Arabic (العربية )

Timezone: Pacific/Easter (GMT-06:00)

Hello,

So i was able to replicate the issue on one of our sandbox environments : hidden link

I have recorded a video explaining this behavior : hidden link

Basically, you are not supposed to change the editing language on ACF fields, even if you do so, WPML will only take into account the last setting you saved regardless of the language,

But as a recommendation, always edit your ACF fields in one language if possible,

It could be confusing of course seeing different settings, but at the end, WPML only takes one language settings and apply it to the other in the background (on the post creation level)

If you think this should be improved, I could escalate the matter to our development team and find a permanent solution for it,

Best,

August 8, 2024 at 3:01 pm #16053539

az-agrC

My issue is that if i go on the english translation for the article, that field doesn't show up.

What we are trying to achieve is having fields in both languages and having the content of the italian fields carry over but still be editable so that whoever is filling the translation doesn't have to fill fields that are already multilanguage.

to achieve this we set up the translation to expert and selected the "copy once" option for the fields themselves.
we have now ran into this issue tho.

hidden link

as you see, in italian - works

hidden link

in english, missing

hidden link

everything is set as

hidden link

any idea how to make this work the way we are expecting it to work?
are we setting it wrongly?

August 9, 2024 at 5:06 pm #16057332

Ilyes
Supporter

Languages: English (English ) French (Français ) Arabic (العربية )

Timezone: Pacific/Easter (GMT-06:00)

Hello,

Here is the settings I had on the Testing site : hidden link

You can check it from here : hidden link

The Test field is getting called on both the original and translated posts, as configured by categories.

On your site :

1- Make sure that all categories are translated correctly under WPML > Taxonomies translation

2- From the default original language, change the field group's settings to "identical fields on all languages"

3- Create a new post/page and assign it one of the listed categories in the ACF group configuration and save, does the field display on original?

4- If yes, Duplicate or Translate the post to second language, do you see the fields there too? is the correct category assigned to it?

If that did not help, could you check the sandbox I shared with you and try to replicate the issue there?

Also, your staging admin access is no longer working for me as it redirects to a 500 error,

Best,

August 12, 2024 at 11:56 am #16062031

az-agrC

Setting it like that works - but the fields in the secondary language don't start "pre-filled" with the data from the italian fields.

Is there a way to automate this "copying over" but still let the option to modify the content of these fields?

Using "copy content from $language" doesn't copy acf fields last time we tried.

August 12, 2024 at 7:56 pm #16063745

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

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

Hello,

Ilyes is absent today, so I'll be responding on his behalf. I've read through all the details of the ticket, so we can pick up where he left off 🙂

Could you try again with a test post using the "copy content from $language" option? Perhaps with the new settings, the behavior will be different.

If it still doesn't work, I ask that you review the access to the staging version you provided. I tried accessing it to test, but I encountered a 500 error.

I look forward to your response.

August 13, 2024 at 9:45 am #16065494

az-agrC

Nothing changed from the previous behaviour - as Ilyes suggested we'd like to suggest changing the way WPML handles category filters in ACF, at least when the "expert" option is selected;

It should save filters *per language* and not as it's doing right now which is a mixup and is not working properly.

We found a workaround by duplicating an article, changing the language and linking the translation manually so we'll go ahead with that.