The ACF team just released v5.5.5 and this problem is now solved. Looks like the issue was related to creating an empty post for each file/image field when no attachment was selected.
Thanks for fixing this one so quickly guys!
@lcg_1111, if you roll it back to v5.5.3, it should work until the latest version is fixed. You can download older versions in your account (hit ‘See all versions’). https://www.advancedcustomfields.com/my-account/
Experiencing the same issue using ACF Pro v5.5.4 on WP 4.7.1.
https://support.advancedcustomfields.com/forums/topic/acf-pro-v5-5-4-creating-duplicate-postspages/
Ok, just had a moment to test this on one of our sites and it appears to have fixed the issue. Initially I didn’t see a change, but after clearing cache, it started working. Looking forward to the v5.4.6 rollout!
Thanks!
We’re experiencing the same issue as well. Any update?
We’re still experiencing this issue as well on several of our sites. Any update?
We’re seeing some issues with preview not working on WordPress 4.6.1 and ACF 5.4.5. It shows the default WP fields, but zero custom fields. The only way around it is to publish the post and then they appear. Any thoughts?
Might could streamline the code a bit, but this is working for me. Hope it helps.
// Expire events
if ($expireTransient = get_transient($post->ID) === false) {
set_transient($post->ID, 'set for 1 minutes', 1 * MINUTE_IN_SECONDS );
$today = date('Y-m-d H:i:s', current_time('timestamp', 0));
$args = array(
'post_type' => 'events',
'posts_per_page' => 200,
'post_status' => 'publish',
'meta_query' => array(
array(
'key' => 'end_date_time',
'value' => $today,
'compare' => '<='
)
)
);
$posts = get_posts($args);
foreach( $posts as $post ) {
if(get_field('end_date_time', $post->ID)) {
$postdata = array(
'ID' => $post->ID,
'post_status' => 'draft'
);
wp_update_post($postdata);
}
}
}
Might could streamline the code a bit, but this is working for me. Hope it helps.
// Expire events
if ($expireTransient = get_transient($post->ID) === false) {
set_transient($post->ID, 'set for 1 minutes', 1 * MINUTE_IN_SECONDS );
$today = date('Y-m-d H:i:s', current_time('timestamp', 0));
$args = array(
'post_type' => 'events',
'posts_per_page' => 200,
'post_status' => 'publish',
'meta_query' => array(
array(
'key' => 'end_date_time',
'value' => $today,
'compare' => '<='
)
)
);
$posts = get_posts($args);
foreach( $posts as $post ) {
if(get_field('end_date_time', $post->ID)) {
$postdata = array(
'ID' => $post->ID,
'post_status' => 'draft'
);
wp_update_post($postdata);
}
}
}
Thanks @hube2! We’ll give it a try and post some feedback.
Ok, just tested v5.3.8.1 and it works great! Thanks again!
Ok, I added the debug script to the wp-config and now it works without errors.
If I remove it and I start getting the same JS error as before. I also tested everything on the default Twenty-Sixteen theme and got the same results.
Hmm, I just re-downloaded the latest files from the account page and it’s still not working on the site I’m testing. I tested it in Chrome (v50), Safari (v9) and Firefox (v46) on a Mac after I cleared the cache and cookies. All of them give me the same error message in the console.
ReferenceError: Can’t find variable: post_id
Interesting. Ok, thanks for the heads up.
Ok, I just rolled one of the sites back to v5.3.7 and it resolved the issue. Looks like it’s specific to v5.3.8. Hope all this information helps.
I just checked the browser console to see what it was doing and it looks like there are some issues in (acf-input.min.js?ver=5.3.8) on line 1369.
ReferenceError: Can’t find variable: post_id
We’re experiencing the same issue with v5.3.8 on several of our sites. We have a few custom image fields and whenever you try and click on the image button, nothing happens. A few other image fields on the page work fine.
The issue appears to have resolved itself for our site — yet we changed nothing. Is there any explanation on ACF end as to why this was happening?
We’re having the same issue on one of our sites as well. It will allow me to save a post as a draft, but whenever I attempt to publish it from the edit post page, the console log keeps infinitely loading this every 30 seconds or so and not publishing the post.
POST http://********.com/wp-admin/admin-ajax.php
{“wp-refresh-post-lock”:{“new_lock”:”1431706252:5″},”wp-auth-check”:true,”server_time”:1431706252}
The site is running WordPress 4.2.2 and ACF 5.2.5. I reinstalled WP and ACF, just in case something was missing in the recent updates. It’s still not allowing me to publish from the edit post page. The interesting thing is it’s working on a few other sites we manage with the same configuration and plugins.
I disabled the ACF plugin on the site that’s having an issue and it’s allowing me to publish from the edit post page. So the issue is definitely with ACF not playing well with WP in some way.
A workaround is to save the post as a draft and then from the post lists quick edit, change the post status to published. That seems to be working.
Any help to resolve this issue would be great. Thanks!
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.