Support

Account

Home Forums Bug Reports "Sync" option not available

Solving

"Sync" option not available

    • wube

    • May 15, 2017 at 7:14 am

    I’m working on a project on several computers, so I keep ACF fields in the acf-json dir and commit it to the repo. When ACF fields are changed then a “sync” options appears in the ACF admin panel… usually.

    Today I’ve noticed a strange thing. ACF json file got modified. I’ve seen a modified file in the acf-json dir but the sync option wasn’t available. The newly added fields were visible on the post edit pages, but on the “Edit field group” screens I’ve seen the old data.

    I tried to modify the timestamp (the “modified”) field in the *.json file manually, I hoped that it will force ACF to “see” the file was modified, but it didn’t help.

    Finally, I made a backup of the acf-json directory, removed the directory, removed all fields groups from the admin panel, restored the acf-json directory – and then the sync option appeared and I was able to synchronise the fields.

    I’m afraid I can’t tell what caused the problem, and I cannot reproduce it. Tell me what else can I provide you with in order to make it easier to find what caused that strange behaviour, because it’s definitely a bug.

  • I’m facing the same issue. I have a modified acf-json file but not “sync available” button appears on the interface.
    I did what you did and it worked! thanks

  • Same problem here. Updating Local JSON files, and even the “modified” value, doesn’t result in the fields group being ‘available for sync’. Is it a bug or I’m missing some step?

    Is there a way to manually trigger the function that checks if there’s available syncs?

    Cheers!

  • There is only one thing that I can thing of that would cause this to happen and that is that the timestamp in the JSON file is less than the last modified date (GMT) of the acf-field-group post. This could happen if someone edited/updated the field group later then what the timestamp in the JSON file is.

  • My bad. I made it work. Was changing the modified date but apparently had some error there. Generated a new one and it worked.

    Thanks!

  • Has anyone else made progress on this? I’ve tried the solutions in this thread but….no luck.

  • Thought I’d add a little extra to this ticket for anyone else in the future. I use the JSON options on a ton of sites and run into the usual permission issue on the odd occasion but on one site my std install (a seperate file with acf filters and hooks) stopped syncing.

    The file was loading correctly which is called into the theme on the functions page and loads

    		add_filter( 'acf/settings/save_json', array( $this, '_acf_json_save_point' ) );
    		add_filter( 'acf/settings/load_json', array( $this, '_acf_json_load_point' ) );

    But for some reason while my class was loading these filters were not firing. Turns out there was a line above including my file that was using get_field an ACF function. Because this ran the filters did not load.

    So in my case this would not work (BAD EXAMPLE)

    
    define( 'MAIN_SITE_URL', get_field( 'main_site_url', 'option' ) );
    //* ACF Hooks and Filters
    include_once( get_stylesheet_directory() . '/lib/AcfExt.php' );
    

    where the acf function was called before the rest of the filters. All it took to fix was changing the order and the hooks fired again as expected

    (WORKING EXAMPLE)

    
    //* ACF Hooks and Filters
    include_once( get_stylesheet_directory() . '/lib/AcfExt.php' );
    define( 'MAIN_SITE_URL', get_field( 'main_site_url', 'option' ) );
    

    Hope this helps anyone else who has a random sync not showing up error

    • shauny

    • March 23, 2018 at 3:29 am

    +1 same issue here, we are getting conflicts in GitHub because the json file is not syncing correctly (Does not show as available to sync even if you change the Field Group).

    • tdchris

    • April 11, 2018 at 11:42 pm

    Same issue. Deleted the acf-json folder and the fields in the admin panel and then re-added the folder and sync became available.

    Thanks

  • I ended up here googling for this same issue, but have found an easier solution:

    Edit the json for the group to have modified = the current timestamp, refresh the admin, and the group will be listed in the sync available list to sync.

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

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.