I believe I have found a bug when setting a post_object field to be disabled (setting it to readonly doesn’t work). The end result is that updating a post that uses a disabled post_object field clears out any values stored in that field. Here’s step by step instructions to reproduce:
- Create a Post Object field, say in an Options page. Allowing multiple values to be set seems to not matter.
- Go to the Options page and add one or more posts to this field, save, and see that repeated saving of Options works fine; the posts set in the field are still there.
- Add the acf/load_field filter to your functions.php in order to set the field so that disabled = 1 (I tried readonly instead but that had no effect).
- Refresh the page, and see that the post you previously set is still there.
- Save the page/options, and on page load, the Post Object field is now blank
I’m getting the same thing, although I’ve noticed if I change the usage of the Cloned field to be Grouped instead of Seamless, it does save the values, although that’s not ideal, since the field I am cloning is already a Group (that has a Repeater inside it).