Setting "Anchor" -> Error loading block

Support MB Blocks Setting "Anchor" -> Error loading blockResolved

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #48237
    metafanmetafan
    Participant

    Hi,

    setting the "anchor" in registering block fields, breaks the block in Gutenberg.

    'supports' => [
                'anchor' => true,
            ],

    The "HTML anchor" input field appears in the advanced tap on the right side. But when entering a (well formatted) anchor-link into the field, the block in the editor vanishes and an error appears: "Error loading block: Invalid parameter(s): attributes".

    Do I need some additional extentions beside "MB Blocks"?
    I work with "Meta Box AIO"...

    Thanks.

    #48247
    PeterPeter
    Moderator

    Hello,

    Thank you for your feedback.

    There is an issue with the HTML anchor support of the custom block. I've escalated this issue to the development team to check it and I will get back to you when I have more information.

    #48428
    metafanmetafan
    Participant

    Hi Peter,

    any news about this issue / bug, please?

    Thanks!

    #49162
    Michael McPeekMichael McPeek
    Participant

    Bump. I am still encountering this error and it's hindering development.

    #49163
    PeterPeter
    Moderator

    Hello,

    This issue has been fixed recently. You won't see the error when clicking on the Anchor setting on the editing page. However, WordPress itself doesn't support this setting for a custom block. Please read more in the WordPress documentation https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/

    Anchors let you link directly to a specific block on a page. This property adds a field to define an id for the block and a button to copy the direct link. Important: It doesn’t work with dynamic blocks yet.

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