We work on a rather large project using a bitbucket git repo.
To make it feasible we take daily DB-backups and have https://github.com/FreshFlesh/acf-sync installed to import json to ACF.
After the latest update we decided to try without the github plugin and it worked well enough for some small changes. Then today it wrecked the whole setup: Emptying a couple of field groups that contained maybe a few hundred fields, and mixing another between json and DB.
I had to do a reset, import the latest DB and use the github plugin again to get it working.
If someone else has the problem, that plugin has worked well for us. I hope ACF sync becomes as reliable, but for now I think we’ll treat it with some caution.
I’ve made this mistake a few times. If you check your acf-json directory into version control and make field edits locally, when you deploy to production the fields will show up correctly and all is good.
However, if in the future you sync your local database with the db from production the ACF json fields will no longer exist in the database.
This makes sense but isn’t immediately obvious when the local acf-json still shows the fields as appearing when you edit posts, but not when you edit the custom fields.
I couldn’t get ACF’s default sync (http://www.advancedcustomfields.com/blog/acf-pro-v5-1-5-update/) or the FreshFlesh acf-sync plugin to work with a manual json sync, but this plugin did seem to work, though I haven’t thoroughly checked to make sure all the data is intact. https://wordpress.org/plugins/acf-pro-sync/
Yeah I’ve noticed this too, along with an issue whereby values aren’t picked up at template level until the post is ‘updated’ which seems to refresh the post values.
This seemed like a great feature to keep ACF fields in GIT and sync’ed between environments, but it’s caused more hassle than it’s worth at the moment!
The topic ‘Strange sync bug’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2022 Advanced Custom Fields.