• Resolved paulwfuk

    (@paulwfuk)


    Hi, firstly great work on the plugin and the recent update.

    I believe this plugin is affecting the WordPress widgets where you are not able to add blocks. The add block button is completely removed.

    Yoast SEO creates the below warning as well but you can still add blocks into the widget areas.

    Are you able to take a look at this? It’s quite critical.

    Notice: wp_enqueue_script() was called incorrectly. “wp-editor” script should not be enqueued together with the new widgets editor (wp-edit-widgets or wp-customize-widgets). Please see Debugging in WordPress for more information. (This message was added in version 5.8.0.) in /app/wp-includes/functions.php on line 5535

    Thanks in advance!

Viewing 6 replies - 1 through 6 (of 6 total)
  • 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' ) );

    Thread Starter paulwfuk

    (@paulwfuk)

    @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.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Plugin Preventing Adding Blocks to Widget Area’ is closed to new replies.