Skip to content

Multiple revisions created on save #46130

Open
@tnprescott

Description

Description

I'm not sure if this is related to issue #16006, but whenever I try to save an update to page content and an update to a custom field at the same time, it creates two revisions. The first revision shows the page content being changed and all the custom post meta values being removed and the second revision shows all the values being repopulated. It does this for new and published paegs. We're currently on WordPress 5.9.3 and ACF Pro version 5.11.4.

Step-by-step reproduction instructions

  1. Using ACF Pro v5.11.4, create a field group and add a custom field "Header Image Scale" to it. Make it a select box with values of
    noZoom : No Zoom
    one_twentyFive : 1.25x
    one_fifty : 1.5x
    one_seventyFive : 1.75x
    two : 2x
    Make noZoom the default value.
  2. Create a new page and edit the page content as well as change the Header Image Scale to 1.5x.
  3. Save the page and check the revisions. There should be two revisions for the one save where the first one strips out the custom post meta and the second adds it back in.

Screenshots, screen recording, code snippet

ACF Fields Removed
ACF Fields Added

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes, No

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    [Feature] HistoryHistory, undo, redo, revisions, autosave.[Feature] Meta BoxesA draggable box shown on the post editing screen[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions