
I have a clone field in a group for a Gutenberg block that is outputting incorrectly compared to other clone fields. The field is called “bg” and clones a field called “color”. Display is set to “Seamless” and Prefix Field Names is enabled. I would expect get_fields() to return 'bg_color' => 'black'
, when dumped but instead it’s returning an array as if I’d set Display to “Group”.
'bg' =>
array(
'color' => 'black',
)
This isn’t an issue we have with other cloned fields so I switched to code editor to see what’s up with the block and it’s not outputting the ACF data correctly.
<!-- wp:ppixels/section {"name":"ppixels/section","data":{"field_67c58efeb4788":{"field_67c58efeb4788_field_67a1e5a6bbfe3":"black"}},"mode":"preview"} -->
If it followed the same format as my other blocks, it should be outputting
<!-- wp:ppixels/section {"name":"ppixels/section","data":{"_bg_color":"field_67a1e5a6bbfe3","bg_color":"black"}},"mode":"preview"} -->
I’ve checked the console log and debug log to see if there’s anything obvious the logs are clear. I’ve tried creating a new field group and recreating the field with no luck. How do I get ACF to retrieve the data correctly?