Home›Support›English Support›[Resolved] ACFML Conditional logic not working correctly with taxonomy fields and WPML translations
[Resolved] ACFML Conditional logic not working correctly with taxonomy fields and WPML translations
This thread is resolved. Here is a description of the problem and solution.
Problem: You are experiencing an issue with ACF (v6.6.2) conditional logic when using taxonomy fields on a multilingual site with WPML (v4.8.5) + ACFML (v2.1.5). The visibility rules based on taxonomy terms work correctly only in the site’s default language. When editing a translated post, the conditional logic checks the term ID from the default language, not the translated term in the current language, causing the condition to fail. Solution: We have published a workaround for this problem. We recommend you visit the following errata page for a detailed explanation and steps on how to implement the workaround: Advanced Custom Fields (ACF) Conditional Logic not working for Taxonomy or Post Object fields in secondary languages.
Please note that this solution might be outdated or not applicable to your specific case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please open a new support ticket at WPML support forum.
100% of people find this useful.
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.
Background of the issue:
I am experiencing an issue with ACF (v6.6.2) conditional logic when using taxonomy fields on a multilingual site with WPML (v4.8.5) + ACFML (v2.1.5). The visibility rules based on taxonomy terms work correctly only in the site’s default language. On a staging copy of the website, we implemented a temporary workaround by filtering acf/load_field and translating the conditional logic IDs on the fly. This fixes the issue, but it feels like a core integration gap between ACF and ACFML. Link to a page where the issue can be seen: hidden link
Symptoms:
When editing a translated post, the conditional logic always checks the term ID from the default language, not the translated term in the current language, so the condition never matches. In English, it fails because ACF still compares against 4 instead of 1053.
Questions:
Could you please confirm whether this is a known limitation?
Are there plans to make conditional logic WPML-aware out of the box for taxonomy, post object, and relationship fields?
Hi Paola,
I'm not sure how to do this: the problem is that the value selector only shows terms in the main language, and if I try to type the name of the term in English, it doesn't give me any results. This also happens when I change the rule to “Terms contain” or “Value contains”, as you can see from the attached image. Am I missing something?
Languages: English (English )Spanish (Español )Italian (Italiano )
Timezone: Europe/Madrid (GMT+02:00)
Hi there!
As a workaround, you can select the translated values by switching to the translated language in the language switcher, as shown in this video: hidden link
I was able to reproduce the problem on my side, so I have escalated it to our second-tier team for further investigation.
I will let you know as soon as I have any updates.
Hi Paola,
Thank you for your message. However, from your video, it is not clear to me whether I need to recreate the entire set of fields when changing the language: I tried switching from the Italian field editing page to the English one, but ACF asks me to recreate everything from scratch (see attached image).
Languages: English (English )Spanish (Español )Italian (Italiano )
Timezone: Europe/Madrid (GMT+02:00)
Ho provato il workaround direttamente sul tuo sito, ma purtroppo non funziona: il campo non mantiene la lingua e il field group non cambia correttamente lingua come dovrebbe.
Ho già passato il problema al nostro team di compatibilità, che lo sta analizzando per trovare una soluzione definitiva.