AdvancedCustomFields / AdvancedCustomFields/acf
Duplicate allow_in_bindings Option in JSON When Modifying Field Groups in Child Theme
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
Description:
We are experiencing an issue when setting up a parent theme with customized ACF fields in the child theme. When a field group from the parent theme is modified in the child theme, it sometimes leads to the allow_in_bindings option appearing twice in the JSON file of the field groups.
Steps to reproduce:
- Set up a parent theme with customized ACF fields.
- Create a child theme and modify an existing field group from the parent theme.
- In the JSON file for the field groups, the
allow_in_bindingsoption appears twice.
Expected Behavior:
The allow_in_bindings option should only appear once in the JSON file, with the correct value based on the parent theme's field settings.
Actual Behavior:
If the parent theme has set allow_in_bindings to 0 (false) for a field in a field group, the child theme adds the allow_in_bindings option again with the value set to 1 (true), causing a conflict.
Additional Information:
- This issue occurs when modifying field groups inherited from the parent theme in the child theme.
- It seems that the child theme is not respecting the parent theme's settings for
allow_in_bindingsand overwrites the value.
Version Information:
- WordPress Version 6.7.2
- PHP Version 8.1.32
- ACF Version ACF PRO 6.3.12
- Browser Chrome Version 134.0.6998.166
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 parent-theme and child-theme field-group setup described in the issue using ACF PRO 6.3.12, then inspect where the field-group JSON is generated or merged. Done means the JSON contains one allow_in_bindings option and preserves the parent value of 0 when the child modifies the field group.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100