I’m having a bug with ACF Pro, since I’ve updated my contributors have been unable to submit their posts for review, when they try the icon just spins and nothing happens, contributors also have the ability to update published posts which I added the user cap to allow them to do that, when they try to update a published post the same thing happens, the icon will just load and never actually go through.
I’ve narrowed this down to being ACF Pro since it started happening once I upgraded and when I deactivate ACF Pro it fixes the issue.
Thanks for the bug report. The issue sounds like an issue with the validation JS.
Are you able to open your console log and watch for any JS errors when publishing the post.
Can you also look at the returned data from any ajax calls which appear when publish the post (can do this within firebug / inspector)
Hi Elliot, @elliot
When I”m logged in as a contributor and am looking at the console the only error I see which is when I open up a post to edit is this.
Uncaught TypeError: Cannot read property ‘keyup’ of undefined wp-seo-metabox.min.js?ver=220.127.116.11:1
(anonymous function) wp-seo-metabox.min.js?ver=18.104.22.168:1
When I click update on a post nothing happens in the console so I’m not sure if this is the error you are looking for.
When I look at the network something interesting happens, pretty much it seems like every 20 – 30 seconds it recalls admin-ajax.php and that the update button wont go through as it just keeps spinning but it will just keep calling admin-ajax.php.
I’m also getting a errors with admin-ajax.php. I’ve attached a few images showing both these issues.
Again it seems that this issue with the ability to publish and to update posts is only happening for our contributors as Admins and Author’s don’t seem to have any issues.
Thanks for the screenshots. Your 3nd image shows that there is a PHP error occuring within a core WP file and causing teh admin-ajax.php file to die.
This is a major issue as both ACF and WP need this file to work correctly.
I would advise that you debug the file using the error message to get the correct line and work out what is going wrong.
Thanks, I fixed the issue, I was hiding sidebar items from contributors and after googling a few things I found someone with similar error and they said that I needed to change
add_action( ‘admin_init’, ‘contributor_remove_menu_pages’ );
add_action( ‘admin_menu’, ‘contributor_remove_menu_pages’ );
Apparently admin_init was causing the issue, I was assuming it was ACF 5 since the issue only occurred once I updated to ACF 5 and when I downgraded back to 4 everything was working fine again but luckily I think I have everything fixed now.
Great work! And thanks for sharing the solution.
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!
🚀 This week’s session of ACF Chat Fridays dips into the preliminary results of our first ever user survey. Don’t miss it! https://t.co/3UtvQbDwNm pic.twitter.com/kMwhaJTkZc— Advanced Custom Fields (@wp_acf) May 9, 2023
© 2023 Advanced Custom Fields.