Support

Account

Home Forums Bug Reports ACF duplicating fields

Solving

ACF duplicating fields

  • Is anyone experiencing problems with duplicate fields? I’m unsure whether it’s a problem with ACF sync or something else?!

    It ultimately causes an error at template level due to there being duplicate fields. I then have to go in and remove each of the duplicates. Working with 29 field groups over a local, staging and production environment is proving to be a complete nightmare.

    Is there a fix or a pointer in possible setup issues etc?

    Thanks in advance!
    Tom

  • 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 https://github.com/FreshFlesh/ACF-Sync 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…

  • I’m getting the same issue.. has anyone resolved this yet?
    If it try to tidy up the duplicated fields then they all disappear from the edit screen. Only way I can retain content is by resyncing and having duplicate fields. Local version works fine its just my staging site.

  • Hi Guys,

    I have just tested this on the latest version 5.3.9.1 but I could not replicate this.

    I can confirm that this is fixed 🙂

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

You must be logged in to reply to this topic.