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

cant_update_item when i edit acf user's fields #374

Open djoo opened 3 years ago

djoo commented 3 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.

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 : OR USER ACTUEL - IS - CONNECTED

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, i can't let this fields everywhere. So i need to find a solution

How can i do this ?

Thanks

djoo commented 3 years ago

Anyone has an idea ?

djoo commented 2 years ago

Up ! Any idea ? Thanks

supagu commented 1 year ago

Did you find a solution to this? I am getting this problem:

{ "code": "cant_update_item", "message": "Cannot update item", "data": { "status": 500 } }

when i try to post the following body: { "acf": { "team": "gump" } }