Gutenberg: Blocks not displaying on backend after the 4.5 update

Created on 21 Nov 2018  路  1Comment  路  Source: WordPress/gutenberg

Hi,

I just updated the plugin to 4.5 and my all custom blocks are gone.

On all the blocks it is displaying these kinds of messages.

Your site doesn鈥檛 include support for the "ct-plugin/slider-1" block. You can leave this block intact or remove it entirely.

Your site doesn鈥檛 include support for the "ct-plugin/gallery-1" block. You can leave this block intact or remove it entirely.

What to do ??

[Type] Help Request

Most helpful comment

Just solve it myself. It seems now you have to add dependencies in the PHP file when enqueuing the scripts.

eg.

    wp_enqueue_script(
        'megablocks_cgb-block-js', 
        plugins_url( '/dist/blocks.build.js', dirname( __FILE__ ) ),        
                array( 'wp-blocks', 'wp-i18n', 'wp-element' , 'wp-components' , 'wp-editor' ) // Dependencies
    );

>All comments

Just solve it myself. It seems now you have to add dependencies in the PHP file when enqueuing the scripts.

eg.

    wp_enqueue_script(
        'megablocks_cgb-block-js', 
        plugins_url( '/dist/blocks.build.js', dirname( __FILE__ ) ),        
                array( 'wp-blocks', 'wp-i18n', 'wp-element' , 'wp-components' , 'wp-editor' ) // Dependencies
    );
Was this page helpful?
0 / 5 - 0 ratings

Related issues

mhenrylucero picture mhenrylucero  路  3Comments

hedgefield picture hedgefield  路  3Comments

franz-josef-kaiser picture franz-josef-kaiser  路  3Comments

spocke picture spocke  路  3Comments

davidsword picture davidsword  路  3Comments