Support

Account

Forum Replies Created

  • Hi everyone,
    just wanted to chime in and tell you that I’ve managed to use ACF with innerblocks. My use case is a “Text” Block which wrapps all other textish blocks (paragraph, heading, list) for a common wrapper (container, margins/paddings – all design reasons).
    I’m using this helper methods and the editor.BlockEdit und blocks.getSaveElement hooks to overwrite the save & edit components of acf blocks. You can see it in this gist.

    It’s kinda hacky, works only until ACF 5.8.2 (have to find out what’s breaking it in 5.8.3). But with mode set to preview, the fields only showing in the sidebar and some styling I managed to get it working for editors/normal users.

    I’m also working on adding custom fields to core blocks – have a proof of concept which adds fields to core/paragraph but not saving correctly atm. If anyone wants to help/the code I’ll set it up as a github repo.

  • Hi guys,
    I did a debugging session right now regarding problem #2 in the original post. I had the same problem that certain sub_fields in flexible_content fields not showed up.
    I found out, that this is a problem with naming fields in PHP code – when registering fields via PHP we sometime gave fields the same key AND name. That workted until 5.7.10, but in 5.7.12 the concept of “stores” is used and the local store uses an alias function to allow searching for fields via key AND name – but this is messed up when key and name are the same somehow – at least for sub_fields in a fc layout. I don’t know why or how it’s messed up exactly – but will try to find out.
    Nevertheless I see no way of fixing this except for renaming and migrating our field names/keys. Will probably do that – that’s gonna be ugly.

Viewing 2 posts - 1 through 2 (of 2 total)