AdvancedCustomFields / AdvancedCustomFields/acf
ACF grouped field not getting updated in WP REST API
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I'm having an issue when trying to update grouped ACF fields using Rest API.
The problem is mainly that when I want to remove a value from a field that is nested in a group of fields - I send an object with "null" values - in response I get the values that were there before the deletion so nothing changes (look at screenshot).
Changing the value to another, works fine. The problem is only when deleting.
FIELDS DESCRIPTION:
"icon_1","icon_2","icon_3","icon_4","icon_5" are group fields.
Inside them are two Image fields "icon" and "selected_icon".
The problem occurs when I try to remove any of the image values.
Let me know if more details need to be given.
ACF Ver: 6.1.7
WP Ver: 6.2.2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the update through the WordPress REST API with ACF 6.1.7 and WordPress 6.2.2, using null values for the nested image fields in the grouped fields icon_1 through icon_5. Confirm whether the values remain after the update and whether changing them to other values still works; done means null updates remove the stored image values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100