-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can't post data to ACF fields on attachments #422
Comments
Possibly this issue is a problem in the ACF to REST API plugin. I posted an issue there too: Maybe it has something to do with how attachments save data—there is no save button. Attachments seem to auto-save. |
This is solved by a setting in the custom field group. Solution was here: acf-to-rest-api-example |
The fix (setting an additional parameter in the field group location settings to current user--is equal to--logged in) no longer works. This always did seem like an unlikely work around. Possibly recent security updates have invalidated it. |
I found a solution to this. I de-activated the ACF to REST API plugin, and added my custom fields to the API this way: Then I post like this: |
This is very strange. I can create and update posts and pages. I can set ACF field data on posts and pages. But I can't set data on ACF fields on attachments. Create and update will both post data to attachments, but not the ACF fields.
I'm using this straightforward code:
In this example, the title updates correctly, and the response ID is logged to the console. But the fields do not update.
I can also update custom fields on Posts and Pages without any problem.
The text was updated successfully, but these errors were encountered: