wp_enqueue_script() was called incorrectly
-
Firstly, thank you for creating this plugin … just what I needed.
However, I’m getting a “wp_enqueue_script() was called incorrectly” warning when I try to access the Appearance | Widgets admin page, which disappears when the Wonder Slider Lite plugin ?is deactivated.
Here’s the complete warning message:
Notice: Function 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 {My Domain }/wp-includes/functions.php on line 5865
Line 5865 registers the block.build.js script, and wp-editor is listed as one of the dependences, which will cause this script to be loaded if not already present, and it seems that this conflicts with the block based editor now used for widgets. Removing the dependency fixed the problem for me, which may be the simplest solution. I’ll leave it with you.
- The topic ‘wp_enqueue_script() was called incorrectly’ is closed to new replies.