AdvancedCustomFields / acf

Advanced Custom Fields
http://advancedcustomfields.com/
823 stars 168 forks source link

ACF Fields disappear when setting templateLock="contentOnly" #880

Open chrismademe opened 8 months ago

chrismademe commented 8 months ago

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:

CreativeDive commented 8 months ago

This is a tricky one. The ACF field can only refer to the content, but also to the design. Therefore, just showing all ACF fields in case of contentOnly is not the right way.

To do it properly, something would have to be defined for each ACF field depending on whether it is a content field or not.