You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This might be complex but I would like to know more how acf:cache works so I can look for a solution. It seems the wrong value is returned for "choices" when page is translated using wpml.
I have defined the choices field with addSelect like this
Understood. And this is an edge case. Thanks for showing how caching works. I will have a look if this can be solved in a clean way. WPML uses a "glue" plugin called WPML ACF for handling fields in different languages. I know that when using this plugin and creating field and saving them as json in acf-json folder they are separated by a lang subfolder. Maybe something similar needs to happen here.
This might be complex but I would like to know more how acf:cache works so I can look for a solution. It seems the wrong value is returned for "choices" when page is translated using wpml.
I have defined the choices field with addSelect like this
wpml_cf_preferences = 1 is so that the value of the select is copied to the translation.
I return the value in my template like this
This works but if I change language on my site the untranslated value is returned.
If I run
wp acorn acf:clear
the correct value is returned. But runningwp acorn acf:cache
gives the wrong value again.The text was updated successfully, but these errors were encountered: