-
-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
The issue
To reproduce this issue:
- install the plugin in a WordPress v6.8.2
- use a theme with the 3 files below
- then navigate to the appearance > widgets page
at that point, this warning will be rendered:
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 /var/www/html/wp-includes/functions.php on line 6121
There is information about this in WordPress/gutenberg#67333.
Minimal theme to reproduce the issue
style.css
/*
Theme Name: Editor Conflict
Theme URI: https://example.com
Author: You
Version: 1.0
Description: Minimal theme to reproduce wp-editor enqueue conflict in Widgets screen.
*/functions.php
<?php
add_action('widgets_init', function () {
register_sidebar(
array(
'id' => 'primary',
'name' => __( 'Primary Sidebar' ),
'description' => __( 'A short description of the sidebar.' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
)
);
});index.php
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Editor Conflict</title>
<?php wp_head(); ?>
</head>
<body>
<?php wp_footer(); ?>
</body>
</html>Solution
The quickest solution I've found is to remove wp-editor from the list of dependencies of the plugin. I'll be sending a PR for consideration a few minutes after publishing this issue.
Metadata
Metadata
Assignees
Labels
No labels