Situation
I register a local field group through acf_add_local_field_group
and add a taxonomy field (through the fields
parameter) with the following settings:
array(
'key' => 'field_platforms',
'label' => 'Platforms',
'name' => 'platforms',
'type' => 'taxonomy',
'taxonomy' => 'mycustomtaxonomy',
'field_type' => 'checkbox',
'load_terms' => 1,
'save_terms' => 1,
)
Behavior
When I click a checkbox to save the taxonomy to the currently edited post, an AJAX call is triggered with the following form data:
post_taxonomy[]:
post_taxonomy[]:14
action:acf/post/get_field_groups
exists[]:group_immo_edit
The call returns an empty result:
{"success":true,"data":[]}
This causes the complete ACF UI to be hidden, leaving a blank edit screen.
This AJAX call is only triggered when save_terms
is set to true.
Expected behavior
Save selected terms to post through AJAX while accounting for field groups registered locally or don’t save terms through AJAX, but only through save_post
action.
Setup
WP 4.5.2
ACF PRO 5.3.8