Home Forums Backend Issues (wp-admin) Revisions dont’t work, get php errors… Reply To: Revisions dont’t work, get php errors…

  • 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.