gutenberg dynamic block is returning 404

The handle() method is being called by an add_action(‘enqueue_block_editor_assets, [$block, ‘handle’]) method along with all the other blocks.

Here lies the problem. The register_block_type is being called too late. Try to call the function inside the init action hook.

You can see an example in the shortcode block of the core.

Leave a Comment