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

maddisondesigns picture maddisondesigns  路  79Comments

jasmussen picture jasmussen  路  173Comments

jasmussen picture jasmussen  路  74Comments

mapk picture mapk  路  84Comments

smp303 picture smp303  路  98Comments