Hi everyone
I regularly use the acf-json
feature as a handy way of version controlling ACF field groups using Git.
This works well on all of my sites, except one. The normal workflow is this: make local edits -> local ACF makes changes in acf-json
-> sync the updated theme to the build server -> updated field groups work on the build server.
This works fine on a number of sites except one. On upgrading this site to 5.1.8 (from which version, I can’t remember), the site seemed to stop pulling in field groups from acf-json
. I’ve temporarily worked around the issue by manually importing the JSON files.
Does anyone have any suggestions as to why this theme might have stopped working off acf-json
? For the record, I don’t have PHP field definitions (as I think that they override JSON defs)
Cheers,
Andrew
Ah-ha! I’ve discovered that this is a problem with WPML – if WPML is enabled, ACF neither reads from JSON, nor offers the ‘Sync Available’ option. @elliot and team, would you like to look at this further, or should I raise it with WPML?
For anyone else with this problem, you can temporarily disable WPML, do a sync and then re-enable it.
Cheers,
Andrew
I do not have WPML installed, and I am also having the same issue.
I’ve been manually exporting fields that I generate using the ACF UI on my local environment, to PHP, and committing that PHP file to the staging site.
I wanted to start using the Local JSON feature to automate this process.
All the JSON files were successfully created when I went through my local UI and clicked “update” for every fieldgroup. But when I committed the new acf-json directory to the staging server (and un-included the php custom fields), no fields were detected by ACF. None at all. But they’re all there in the acf-json directory…