I’m having issues with the synchronization feature as well. The save point works fine. The files get stored in the right place and update each time I save a group. The sync available
option, however, does not appear as predicted after I pull relevant changes from my repo onto my other machine (which, in fact, has no field groups in its DB). Neither does the option appear on the original machine after I edit the files directly. I even incremented the modified
property.
These are my save and load points:
add_filter('acf/settings/save_json', 'p2c_acf_json_save_point');
function p2c_acf_json_save_point( $path ) {
$path = plugin_dir_path(__FILE__) . 'fields/acf-json';
return $path;
}
add_filter('acf/settings/load_json', 'p2c_acf_json_load_point');
function p2c_acf_json_load_point( $paths ) {
unset($paths[0]);
$paths[] = plugin_dir_path(__FILE__) . 'fields/acf-json';
return $paths;
}
Permissions on the directory are writeable. I use username:www-data
as owner:group
in my local environment with 775 permissions.
I also tried adjusting the priority of the filters to no effect. plugin_dir_path()
already provides the trailing slash and I verified that the correct directory is pushed to $paths
(and the default removed).
Any ideas?