Drafts and Pending Review aren’t saving when I click Update. It just publishes them. Able to replicate this error under different situations – single, multisite, development, production sites. I opened the console and here’s the error message:
load-scripts.php?c=1&load=hoverIntent,common,admin-bar,suggest,wp-ajax-response,jquery-color,wp-l…:329 Uncaught TypeError: Cannot read property 'id' of undefined
ACF Version 5.2.0
Wordpress Version 4.1.1
Any leads or suggestions appreciated!
This is an issue I am facing as well.
Steps to reproduce:
I will see about bringing this to the attention of the developer.
But I have a question in the mean time that will probably also help the developer as this may be a feature of ACF.
Under what conditions or under what circumstances would you want to save an ACF field group as “Pending Review” or “Draft”
Yeah, as jefffassnacht mentioned, my intent is to use a draft field as a place to store fields that are a work in progress, or are pending a future deployment.
Real life example: I might have an upcoming code deployment that relies on specific fields. Rather than having to instruct the person performing the deployment on how to export a field group from the staging site and import it into the production one, I could instead have the requisite field groups set as drafts pending the deployment.
The developer performing the deployment could then simply set them to Published once the changes are live.
Hmm i think i misunderstood this topic then!
For me the problem was that on the frontend people fill in a form and the data entered in the form will be saved in a CPT, that CPT is then on “Pending”.
It needs to be reviewed before it can be published and a administrator will review the new post in the CPT, it is possible the administrator can edit some data, if that happens and the administrator Publishes the post the edited data didnt get saved!
For me the fix was easy by adding:
at the part where i was updating the post :), to bad this doesn’t happen automatically by ACF. (Still took me a while to find out :p)
Thanks again for this bug report.
I intend to add a new setting to the field group to enable / disable it.
I’m not sure what the best method for this is just yet, and want to make the best informed choice.
I’m thinking of using the ‘draft’ post_status or creating a custom post_status for this. Or perhaps just a field group setting like ‘layout’.
This will not make it into the upcoming 5.2.8, but will be the focus for 5.2.9
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!
© 2023 Advanced Custom Fields.