Support

Account

Home Forums Backend Issues (wp-admin) Anchor support – acf block type not working, after updating wp core to 5.9

Solving

Anchor support – acf block type not working, after updating wp core to 5.9

  • After updating wp core to 5.9,
    acf block type, anchor field cant be saved and not work any more,
    $block['anchor'] return true instead of value (value cant be stored)
    before wp core update
    $block['anchor'] return correct value and its stored in block.

  • I’m experiencing the same issue! Googling around I found that this problem (saving anchor value due to incompatibility with a WP helper function) already arose and was solved in the past. See: https://github.com/elliotcondon/acf/issues/768

  • I am having the same issue since updating to WP 5.9. If I echo $block[‘anchor’], it shows in the editor right after saving, but when viewing the page, or reloading the edit screen again, the anchor is gone. The anchor string is also gone from the “HTML anchor” value in the Block’s Advanced Settings.

    Anchor values remain for core WP blocks.

    I have the following set in acf_register_block_type: ‘supports’ => array(
    ‘anchor’ => true
    )
    And the HTML Anchor text box shows in the Block Advanced Settings. It just does not persist.

    I also do not see ‘anchor’ as a property outputting var_dump($block)

  • today I’ve found this on GitHub repo. https://github.com/AdvancedCustomFields/acf/issues/567
    The problem was already acknowledged. The interesting part is the temporary workaround: wrap acf block in a group and assign the anchor to that.

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

You must be logged in to reply to this topic.