Closed jwdsign closed 1 year ago
Hello,
Thanks for the feedback, and sorry for the late answer!
Since ACF now provides an builtin method for Field Types REST API, I can easily provide the correct schema for this field. I'm adding it on my todo lsit for the next patch!
In the meantime, you should be able to fix by yourself using the acf/rest/get_field_schema
filter. Usage example:
add_filter('acf/rest/get_field_schema/type=acfe_taxonomy_terms', 'my_taxonomy_terms_schema', 10, 2);
function my_taxonomy_terms_schema($schema, $field){
$schema['type'] = array('string', 'array', 'null');
return $schema;
}
Hope it helps!
Have a nice day!
Regards.
Hello,
Just a heads up to let you know that this issue has been fixed in the latest patch.
Have a nice day!
Regards.
Describe the bug Trying to update a Taxonomy Terms field via REST API v2. The values are saved as an array, but the REST-Controller expects type "string, null".
To Reproduce
Expected behavior Expected REST-Schema: ['string', 'array', 'null'];
Screenshots Error Message:
WordPress & ACF WordPress version: 6.0.2 ACF Pro version: 6.0.2 ACF add-ons: ACFE