Home Forums Backend Issues (wp-admin) Adding/Removing Repeater rows does not save a Revision


Adding/Removing Repeater rows does not save a Revision

  • I just found out that when I removed a Repeater item that WP did not save a Revision. I then tried adding a Repeater item and it still did not save a Revision. However, if I change the content within the Repeater item it does save a Revision. If I added a new Repeater Item then change the content in the item it did save the Revision.

    I tested it many times even with other Plugins disabled and still got the same results.

    While this might not be a large issue as Revisions are saved when content is changed it does mean that you can loose revisions based on layout when using the default values from repeater items. I think a revision should be created when the row number changes for repeater items.

    If this is not possible to do in an Update, could someone offer some code that can achieve this.


  • Hi @geoff-grav,

    I just started working the forums so hopefully you won’t have to go on a bump-frenzy anymore. We’re now a few people that will support you guys.

    I’m not sure wether this should fall on ACF or WP Core. Triggering revisions saving in an edit-post screen is done by WP Core and it would seem it does not react to the creation of new input fields (not so strange).

    I’m not sure there’s a possibility to even trigger revisions manually? That’d be a necessity if ACF would take a stab at it.

    Have you tried this plugin? I haven’t looked at it closely but perhaps it does what you want:

  • Thanks, I will look into the Plugin if the client keeps having this issue. Personally I don’t like the idea of adding another plugin for something that I think should be handled by WP or ACF.

  • I agree with you but I’m not sure how one would tackle this. It’d be one thing if there was a way to manually trigger a revision save but there doesn’t seem to be one (from my findings).

    Let me know if you find such a way, then we’d be able to actually do something about it!

  • i have same issue i am suffering from repeater field revisions i tried all this plugins but i am not get any solution please help me out i need to show each every field revisions .

  • `php
    wp_save_post_revision( $post_id );

    That function will save a revision, combined with add_action( ‘save_post’, ‘FUNCTION ) it could be used to force a revision to save. Though wp_save_post_revision still checks if it should save (if any changes are present) you can filter a positive response using filter “wp_save_post_revision_post_has_changed”.

    A complete solution would require some testing, it’s easy to end up with duplicate revisions or other issues.

    I found this post when researching a different problem, when I manually make revisions that are essentially a clone of the current post all the ACF fields show in the revision history as changed even though they are not changed.

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Adding/Removing Repeater rows does not save a Revision’ is closed to new replies.