AdvancedCustomFields / AdvancedCustomFields/acf

Duplicate allow_in_bindings Option in JSON When Modifying Field Groups in Child Theme

Open
#950 0 comments 0 reactions 0 assignees View on GitHub

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:

  1. Set up a parent theme with customized ACF fields.
  2. Create a child theme and modify an existing field group from the parent theme.
  3. In the JSON file for the field groups, the allow_in_bindings option 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_bindings and 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.