I quickly looked under the hood and found a few things about my issue:
– The ‘save_post’ hook isn’t firing when I update a Page. Not sure exactly why…documentation is slim even though this is a common problem…but perhaps we should hook the
acf_admin_field_group::save_post() method to ‘pre_post_update’ instead?
– The ‘field_group’ nonce can fail when there are multiple field groups. This writes multiple ‘_acfnonce’ hidden inputs to the page’s form. The last input value stomps the other nonce values (which don’t appear in the POST params). Perhaps the _acfnonce value should be keyed to each particular field group?
I would be happy to contribute code to fix these issues if you give the thumbs up, Eliot.
Hope that helps.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2022 Advanced Custom Fields.