airesvsg / acf-to-rest-api

Exposes Advanced Custom Fields Endpoints in the WordPress REST API
https://wordpress.org/plugins/acf-to-rest-api/
1.32k stars 111 forks source link

Impossible to edit ACF fields for a current User (not a problem of authentication) #383

Open djoo opened 2 years ago

djoo commented 2 years ago

Hi,

When i try to edit fields of a user i have the error : {"code":"cant_update_item","message":"Cannot update item","data":{"status":500}}

My endpoint is : wp-json/acf/v3/users/(ID)

I use PUT method.

Idea of fix, but it's a problem

After few hours I found something really weird that make it works but i can't use this forever : I need to put a rule in my ACF configuration like this to make it works (with the OR) : Works

This configuration add all the ACF fields for all elements (post, custom post type...), but let the UPDATE works through the API. The problem is that i can't let this fields everywhere. So i need to find a solution to make it works with this configuration Works

How can i do this ?

Thanks