Home Forums Backend Issues (wp-admin) Error when using options in blocks


Error when using options in blocks

  • I’m getting an error whenever I try to use the value from an options screen for a block.

    I register the options with acf_add_local_field_group.

    I register the block with acf_register_block_type.

    If I try to retrieve the value of an options field when I’m initializing my block I get this error, but only on the screen that has the options field. I don’t get this error on the front-end when displaying the block, or on the back-end when editing pages that contain the block.
    Notice: Undefined index: rows in C:\Users\Eli\Local Sites\globalplugin\app\public\wp-content\plugins\advanced-custom-fields-pro\includes\fields\class-acf-field-textarea.php on line 57

    The error changes according to the type of field but it’s always similar.

    Any ideas of what to check? I’ve thought of detecting if it’s an options screen and not have the block use the options field in that case, but that seems kludgy.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.