Home Forums Bug Reports ACF duplicating fields Reply To: ACF duplicating fields

  • Actually I just updated to ACF 5.1.8 and the sync still does it.

    We have production- and staging servers. Locally we develop on Vagrant.
    We git everything to bitbucket and sync fields between vagrants and servers through the ACF json files.

    On the production server, the customer is adding content, and we respond to requests and bugs by fixing them locally, pushing, bambooing to stage and then when stable bambooing to prod. To get the changes locally we use WP Sync DB to pull the database from prod to dev and then sync the json to get our ACF to the latest state.

    I’ve had to use to get it to work, because when I try to use the ACF bundled sync it acts really, really weird.

    What it does is sometimes duplicating fields, and then loosing repeater subfields. This might not be a catastrophe if it didn’t arbitrarily make the json explode at the same time. Now counting three times, I’ve been in the position to have to reset to earlier commit, backing up the json, pulling myself back to HEAD and then pulling the DB all over again, and firing up the ACF-Sync plugin to do what ACF should be able to do just as well.

    ** Hey Eliot **, I think the culprit here might be that you try to do too much in one go. You try to sync both ways, don’t you? First pulling the json into ACF, and then saving a new json. So if operation one creates a problem, then operation two gets equally fu**** up… I would like the option of pulling one way only, letting the json stay untouched, that way I have something to fall back on if the fecal matter hits the rotating impeller.

    Could you separate the sync to db and sync to json from each other?

    I think I will start at ticket…