AdvancedCustomFields / AdvancedCustomFields/acf

ACF Fields disappear when setting templateLock="contentOnly"

Open
#880 1 comment 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

Describe the bug
On an ACF block, when using InnerBlocks and setting the templateLock prop to "contentOnly", the fields disppear from the sidebar. When using the "all" or "insert" values, they remain.

To Reproduce
Steps to reproduce the behavior:

  1. Create an ACF block with at least 1 custom field
  2. Add InnerBlocks support to the block with `"supports": { "jsx": true }
  3. Create some mark and include the <InnerBlocks /> component
  4. Add templateLock="contentOnly" to the InnerBlocks component and your fields will disappear from the sidebar

Expected behavior
ACF fields should remain for all templateLock values.

Screenshots or Video
Screenshot 2023-10-26 at 13 05 15
Screenshot 2023-10-26 at 13 05 27

Version Information:

  • WordPress Version 6.3.2
  • PHP Version 8.1.23
  • ACF Version ACF PRO 6.3
  • Browser All browsers

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

Reproduce the issue by creating an ACF block with a custom field and InnerBlocks using templateLock="contentOnly", then compare it with "all" and "insert". The payload names no repository files or tests; done means the custom fields remain visible in the sidebar for every templateLock value.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.