Thanks as ever for the best WordPress plugin of all time!
I’ve experienced a bug for a while now, and thought I should let ACF know, as it’s quite niche and could have been missed.
If you drag and drop any field that stores a post ID into a nested field type (repeater, flex content, group) the “return format” seems to always be “post ID”, even if you’ve set it to something else. This can only be fixed by changing the “return format” TO “post ID”, saving the field group, then changing it back to what you actually want. This affects fields like: image, post object, file etc (I think anything that stores an ID).
Let me know if you need any more advice – it’s been around for more than a year, I think.
The reason is that you cannot take a field that is not a sub field and then make it a sub field. This causes the meta_key of the field to change and disconnects any existing data from the field. You cannot alter the hierarchy of fields unless you change all the meta_key values for the fields and the acf field key references in the database.
This is not a bug, it’s how ACF works. You will find numerous topics here on the forum about how changing field names and recording fields in this way.
Okay – in that case, shouldn’t drag and drop on the field group admin page be disabled to prevent people from being able to move a field inside another field, and instead only allow people to change the order of fields?