Home › Forums › Backend Issues (wp-admin) › WP 3.9 Validation Failed disables Publish button
This is an issue happening in WP 3.9. If a custom field is required and you try to publish the post without the required field, the error message appears as usual (“Validation Failed. One or more fields below are required.”) but the “Publish” and “Save Draft” buttons changed to a disabled state, preventing from update the field and save the post.
I’ve noticed the same thing. This is a show-stopper for me, so, for the time being, I’ve put the following workaround in my functions file. It just removes the ‘disabled’ class from the ‘Publish’/’Update’ button as soon as it’s added, which allows you to click it.
I am having this same issue. But I cannot get Matthew’s solution to work. I think it’s because I am using custom post types, not sure. Any ideas how I can get the publish button to work?
Yeah that did it! I do not have a very good understanding of the WP API or php for that matter. But I assume that custom posts must not use post-new.php or edit.php?
Oh and thank you very much for your help. =)
I’m not sure exactly. I don’t have time to dig into it right now, but I assume this bug will be fixed in ACF shortly so it should be unnecessary soon. 🙂
I’m also using Custom Post Types (CPT UI) and get this same issue on 3.9 even after trying to add Matthew’s hack above.
I can confirm I’m getting this bug as well.
I can also confirm this bug. Thanks for the temporary fix Matthew.
Yep…ditto here, same bug. And yes….thank you Matthew for the temp fix.
Just released an update 4.3.8 to fix this issue.
Elliot…thanks so much for your attention to this, but I’m afraid that after updating to 4.3.8, I’m still seeing the issue on my site. In my case, this is a required image field.
If I try to save without an image, I’m prompted to pick one, but then after doing so….I remain unable to save the post.
Thank you for all of your hard work on ACF…it is an amazing plugin.
Thanks for the fix Matthew, I had to remove the if statement like Overbound.
Interesting to note that it’s also a bug for ACF field groups as well! e.g. if you’re on /wp-admin/post-new.php?post_type=acf and hit Publish without first giving the group a name it disables the Publish button.
Elliot: I’ve got version 4.3.8 like rpetersnmt also — the fix doesn’t seem to be in effect. Adding a new field group and hitting Publish is a quick test 🙂
Hello sir, I am newbie in wordpress. I am facing the same problem, on page updating using acf.
Where I have to put that code Matthew sir.
@rashed You can put this code in your functions.php file, which acts like a plugin that is automatically loaded for the current WordPress theme (more info).
If this problem is happening for you, though, I would definitely recommend starting a support ticket with ACF, since this particular forum post is almost five years old and might be a completely different issue. 🙂
I am using wordpress 5.0.3. I put this code functions.php but it’s having same issue.
I tried to dynamic footer section, after then I am facing this problem.
But it’s working for the other pages, where I also used acf. Only the home page showing this error.
@rashed I’m unclear exactly what the issue is; can you provide a more detailed explanation of what is going wrong? Maybe a screenshot with more context, or multiple screenshots?
When I clicked update it’s showing this error. Just only for home page. Other pages working fine.
I also checked whether required fields empty on not. But every required field is filled.
This page update worked fine before trying to dynamic footer. But I didn’t find any issue in footer.
I’m not sure what you mean by dynamic footer—can you clarify?
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 2023 ACF Annual Survey closes tomorrow! This is your last chance to complete the survey and help guide the evolution of ACF. https://t.co/0cgr9ZFOJ5— Advanced Custom Fields (@wp_acf) May 18, 2023
© 2023 Advanced Custom Fields.