Background of the issue:
I am trying to assess what is wrong with JSON-based field definition "Support Landing" across multiple languages. The field groups were defined per language as this site predates ACF-WPML integration, so the base language group does Copy Once and the other languages are Don't Translate. The page and its ACF data has functioned correctly for several years and just recently started misbehaving. Link to a page where the issue can be seen: hidden link
Symptoms:
PHP error messages indicating the results from get_field/get_fields do not include the correct field group data. Database postmeta is consistent with the definition but is being ignored.
Questions:
Why are the field group updates not being respected in the rendering page template even after JSON sync?
What could be causing the PHP error messages related to get_field/get_fields?
Why is the database postmeta being ignored despite being consistent with the definition?
While you wait for my colleague to take over the ticket, let me try to help you with the issue quickly.
1) Please note field groups should be set to do not translate, and you should have only 1 set of field groups, which then have fields that have translation settings. Having field groups translated can cause issue and is not recommended. Please check if that helps.
2) Does the error and issue also happen without WPML plugins?
3) Can you check if the issue still happens with only WPML plugins and ACF, while using the WP default theme? Since you are using custom-coded theme, it is not in our scope to debug custom solutions.
With the understanding that I implemented this field group independently across all languages 6-7 years ago (this was before ACFML was a thing), my presumption is that the new paradigm causes old workarounds to break, I decided to start fresh, deactivate the old field group (and its cousins in the other languages), and start a fresh one that contained the exact same field definitions, hoping that calls to the metadata would pick up the old values (by field machine name) and prevent a tedious re-entering of all content.
Initially, I set the field group to "Same fields across languages" as I knew the field definitions themselves would not change between languages - the field group was visible and accessible in the default language (and did grab the old values!), however, the field group does not appear for editing in the translated languages at all.
Does the field group itself need to be translated (or just duplicated if we don't care about back-end translation), and if so, what should the Multilingual Setup setting be for this field group if we anticipate different languages to have varying repeater contents?
The field group should only be set to "Same fields across languages" if you are translating the field with the WPML Translation Editor.
For translating the fields with the WordPress Editor please set the field group to "Different fields across languages".
Also, make sure that ACF Field Groups are set to "Not translatable" and any duplicated field groups are deleted.
If this is not a solution for you, take note that you might not need ACFML if you are not planing to translate any of the field groups with the WPML Translation Editor.
I noticed that if I set acf-field-group to "Not translatable" then all my duplicate field groups now show up in all languages, which is something I can work towards resolving but will need time to make sure all languages still behave correctly. However, the fatal error did go away at that point.
If some of my field groups have dropdowns/radio buttons where the labels will still need to be translated, how will I implement that with the above change?
I believe there may still be situations where the Translation Editor will be used instead of editing the fields in place in each translated page/post, so for the moment I'm keeping those.
Also, now that I've switched field groups to "Not Translatable", *some* of the fields in the group no longer show up in get_fields() arrays, and calling them directly via get_field() results in an integer (the count of the repeater they represent) and not the array I am expecting.
If you use the WordPress Editor for translating the pages or posts that are holding the fields, then please set each field group to "Different fields across languages" in ACF.