We have a WordPress site where the same ACF field group is defined both via the GUI and in functions.php using acf_add_local_field_group.
Recently, we needed to update the label of a custom field inside that group. However, the functions.php definition takes precedence, and we would like to manage everything via the GUI going forward.
So, we edited the label in the GUI and commented out the corresponding acf_add_local_field_group definition in functions.php. After doing this, the custom fields still appeared in the post edit screen?but all previously entered values were missing (empty).
At first, we suspected the field keys might have changed, but after verifying, there were no differences between the GUI and functions.php. To confirm, we exported the field group from the GUI (via the PHP export tool) and pasted that back into functions.php. With this, all the values were restored and displayed correctly.
Important note: This issue only occurs with fields inside a Flexible Content layout. Regular fields outside of Flexible Content work fine and retain their data after switching to GUI-based management.
What kind of situation could cause this issue?
Also, how can we fully transition to GUI-based field group management without losing previously entered data inside Flexible Content layouts?