Support

Account

Home Forums ACF PRO JSON sync in multisite Reply To: JSON sync in multisite

  • Thanks for your help John.

    I’m marking your response as resolved because it’s helped me come to a decision, and made me realise how the site should have been built. However, due to time restraints I can’t explore your proposed solutions, and I don’t think the time it would take me to find the best alternative (potentially a day) would be re-gained in any time saved in future deployments.

    I don’t get how currently what I do works and copied changes from site to site are isolated between database tables but when you apply json sync it overwrites due to the field groups being the same.

    After much thought it’s evident that the structure of the field groups in the site I’m working on is beyond repair unless I wanted to do a couple of days data entry in re-creating posts after re-grouping fields and then re-write all the field name look ups in the php, not to mention all the testing.

    The site was built a couple of years ago (not by me), quite a lot of posts have been created using field groups that have been shared and subsequent fields have been added in the same field group. In the main post there are 22 fields in one field group for instance, and in the parallel site there are 25. When I activated json sync I was horrified to find that it overwrote the fields and subtly different settings such as number of rows in repeater fields and which fields were set as required. This is because from the very beginning the ACF export option had been used to copy across fields and then the appropriate modifications were made, all in complete isolation. It appears you have more control over manually copying and then modifying/removing field groups between sites from the out of the box database way than using json sync. I guess this is because ACF is not built in mind for multisite and any solutions for multisite are work arounds.

    To summarise, the option of splitting unique field groups up by defining them within child themes could work, but in my circumstance of just two sites (but potentially more in time) and 90% of field groups being shared, but with subtle differences I’ll have more control doing things the manual way and double checking than relying on json sync.

    The lesson learned would be – when working on future sites (especially wordpress multisite) – to make field groups as smaller, more portable, specific use components rather than cramming everything into one mega field group. Same principle as when writing functions when programming!