Hello dear ACF users,
I’m having an issue with ACF (WP 5.8.1 and ACF 5.10.2).
I’ve created a bunch of field groups. However, when I try to create a post using one of the field group, the datas contained in the custom fields are not saved when I try to publish or save to draft.
I have to reopen the saved post. All the fields are blank at new, and it works finally on the second attempt.
I only have ACF as plugin, and I tries with the default WP themes, and the issue is still here.
Thanks in advance for your help.
I came here to report the exact same issue! Everything was fine until recently. Perhaps the last WordPress update broke something? I am using the same versions as you.
Everything appears to be sending correctly and the response looks correct on the initial save, but the data is not saved.
The update sends the exact same data to the exact same endpoint and gets the exact same response, but it works.
OK here are more information to help for the debugging.
From what I can see on network capture, the ACF datas aren’t sent to the server at the first post save, except for the fields validation.
So basically, the network activity that I see when I push the publish button is something like:
-POST /wp-admin/admin-ajax.php …. action=acf/validate_save_post (the ACF fields are here)
-Ok valid, success
-POST /index.php/wp-json/wp/v2/posts/<id>?_locale=user (in data, there are the post title, categories, status, but no ACF fields…)
-OK, post created
POST /wp-admin/admin-ajax.php action=acf/ajax/check_screen
And that’s all. In this configuration, the ACF data are never sent to the server, except for the validation. So it can be a beginning of the investigation here.
Hello, I was able to find a workaround on my side. I found out that it was happening only on fields that weren’t directly drawn on page loading (e.g, fields that only appear if some conditions are matched).
So I choosed to draw by default all fields, and filter them after when the user select his options/categories, etc. This is not perfect but it works
I also have fields that don’t save the first time. I use them in custom fields with a taxonomy condition. Is there any update on this?
The acf fields for another custom post type – without conditions – do save at first save.
But my ACF image-field in the taxonomy categorie don’t show also not on a Xth save – no conditions apply here.
I got same issue with ACF Pro and contacted the support.
The support guy said they recognized this issue and trying to fix with the next major version up.
At now, only I can do is saving draft before writing anything in ACF fields, and hit F5 reload, then write in ACF fields.
You must be logged in to reply to this topic.
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!
The ACF site is currently experiencing some issues.— Advanced Custom Fields (@wp_acf) September 21, 2022
We apologize for the inconvenience and we are working hard to get it back up and running as soon as possible.
© 2022 Advanced Custom Fields.