I also had the duplication issue when trying to upgrade from 4 to 5. Would it being a network activated plugin in a multisite installation cause this issue?
I managed to do it by using the method below, but would like to know if there is a better way to do this.
function acf_load_red_color($field) {
$field['default_value'] = '#EA2830';
return $field;
}
function acf_load_green_color($field) {
$field['default_value'] = '#219BA6';
return $field;
}
function acf_load_blue_color($field) {
$field['default_value'] = '#000000';
return $field;
}
$style = get_field('base_style', 'option');
if($style == 'red') {
add_filter( 'acf/load_field/key=field_53bd8ce3bfc22', 'acf_load_red_color' );
add_filter( 'acf/load_field/key=field_53bbfc499145f', 'acf_load_red_color' );
} elseif ($style == 'green') {
add_filter( 'acf/load_field/key=field_53bd8ce3bfc22', 'acf_load_green_color' );
add_filter( 'acf/load_field/key=field_53bbfc499145f', 'acf_load_green_color' );
} elseif ($style == 'blue') {
add_filter( 'acf/load_field/key=field_53bd8ce3bfc22', 'acf_load_blue_color' );
add_filter( 'acf/load_field/key=field_53bbfc499145f', 'acf_load_blue_color' );
}
Can confirm this issue as well.