• Resolved Miikka

    (@miikkamakela)


    As of WordPress 6.6 assumably, InnerBlocks that have only certain allowed blocks show all elements as addable from the sidebar without any indication of info.

    When the InnerBlocks area is selected (red), the sidebar (blue) shows all the blocks and not just the allowed ones:’When the InnerBlocks area is selected (red), the sidebar (blue) shows all the blocks and not just the allowed ones:

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi, I have the same issue since WordPress update from 6.4 to 6.6. In the back office, when creating a custom RTE block and using the ‘allowedBlocks’ prop to prevent other blocks to be used in the custom RTE block, in the slash inserter, we still got a list of all the existing blocks displayed in the select-box, but we can only select the allowed ones. And it is annoying for the user to have this whole list full of unselectable blocks. It would be better if the ‘allowedBlocks’ also hides all the disallowed blocks and shows only the allowed ones. This issues was not present in the 6.4 version of wordpress. Would appreciate if someone find a fix to this. Thanks

    • This reply was modified 2 months, 2 weeks ago by zwiz. Reason: typo
    Moderator Support Moderator

    (@moderator)

    Hi @miikkamakela, thanks for reaching out.

    Can you please share a screenshot of the list view to show how you created the inner blocks (red)? And what are the ‘allowed ones’? That way, we can try and replicate this on test sites and see the behavior of the ‘not allowed ones’ as well. Thank you!

    Thread Starter Miikka

    (@miikkamakela)

    Not sure I fully understand what you are asking for, but the registering of blocks is mainly through ACF. So maybe something has changed there also who knows?

    But here is the gist of the allowed blocks that should be seen:

    But in this case the left side shows bunch of stuff that isn’t allowed in the InnerBlocks area even when only that content area is selected.

    Moderator mizantium

    (@janmtm)

    Hi @miikkamakela !

    It seems you’re using ACF to register your block, which differs from the native approach outlined in the WordPress block editor tutorial (linked below) for setting up nested blocks and controlling allowedBlocks. Since the code and approach you’re using are specific to ACF, I recommend reaching out to the ACF support team or consulting their documentation for guidance on resolving the issue with allowedBlocks not working as expected.

    https://developer.www.ads-software.com/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/

    Additionally, I suggest ensuring that both your Gutenberg plugin and WordPress core are up to date, as there may have been changes or fixes related to block behavior in newer versions that could impact how allowedBlocks are functioning within your ACF block.

    Hi @zwiz ! Could you create a new topic thread, for assistance if your issue is not exactly the same as @miikkamakela issue, in terms of how it is has been set up (that is, not* with ACF). Thank you so much.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.