Just wanted to point out the error notice too. I can add widgets though. The error occured in my theme as well – there I had to remove wp-edit-post from my gutenberg script dependency to get rid of it. I have no idea why (I’m not so deep in programming) but so far everything seems to work.
wp_enqueue_script( 'theme-blocks', get_template_directory_uri() .'/assets/js/blocks.js', array( 'wp-blocks', 'wp-dom-ready', 'wp-edit-post' ) );
changed to:
wp_enqueue_script( 'theme-blocks', get_template_directory_uri() .'/assets/js/blocks.js', array( 'wp-blocks', 'wp-dom-ready' ) );
@azragh thanks for your info.
Sadly I have no reference to wp-edit-post in my theme so not able to apply a quick fix to use the widget areas unless I deactivate the lazyblocks plugin. But then I can’t access my custom blocks.
I had the same issue. I didn’t had a wp-edit-post dependence either, but I did had a similar line in a custom plugin I use:
wp_enqueue_script('wd-editor', plugin_dir_url( __FILE__ ) . 'js/editor.js', array( 'wp-blocks', 'wp-dom' ), filemtime( get_stylesheet_directory() . 'js/editor.js' ), true );
I changed to something similar to what @azragh said:
wp_enqueue_script( 'theme-blocks', plugin_dir_url( __FILE__ ) .'js/blocks.js', array( 'wp-blocks', 'wp-dom-ready' ) );
And now it works with the Lazy Blocks plugin activated. I’m not sure what’s the exact issue.
Edit: it didn’t work actually, but indeed the problem is related to Lazy Blocks as the widgets only works when the plugin is deactivated.
I’m having the same problem on a new development site. If I enable the latest Lazy Blocks plugin, then I am unable to add any blocks to the Widget area. The only other plugin I have installed is Akismet and it is de-activated.
If I deactivate Lazy Blocks, then my Widget area works.
Same problem here. Seems to be an issue with the latest version. Reverting to the previous version clears the error.
Plugin Author
nK
(@nko)
Hey guys.
Thank you for reporting to me, this bug will be fixed in today’s plugin update.
Regards, nK.