If it helps, this was the fix, but it requires you to edit ACF core. From Elliot:
I’ve just done some testing and believe to have found a solution.
Would you mind editing the ‘core/revisions.php’ file on line ~120 (wp_post_revision_fields function) and change it to:
function wp_post_revision_fields( $fields, $post = null ) {
// validate page
if( acf_is_screen('revision') || acf_is_ajax('get-revision-diffs') ) {
// bail early if is restoring
if( acf_maybe_get($_GET, 'action') === 'restore' ) return $fields;
// allow
} else {
You will notice there is a new condition that checks if the post is restoring.
This extra line should fix the issue.
Yep! Elliot said it will be in the 5.6.0 release.
@hube2 I just submitted a ticket. Thanks for your debugging efforts on this 🙂
@adjteam I am also troubleshooting a seemingly unrelated issue and ran into this problem. I came to the same conclusion as you — the error occurs when the value of an ACF field is an array, not a string as WordPress is expecting.
I am having a similar problem, only this is happening to me (randomly, it seems) when a post is saved in the WordPress admin. A new revision is created, but it shows that all the custom fields have been emptied, when they haven’t been. Publishing the post again puts all the custom field values back in a new revision.
@goldhat did you ever discover the root cause of your issue?
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.