• Resolved joostverweijen

    (@joostverweijen)


    The new 3.0.0 update breaks the widget page, due to the following error:
    PHP Notice: Function wp_enqueue_script() was called <strong>incorrectly</strong>. “wp-editor” script should not be enqueued together with the new widgets editor (wp-edit-widgets or wp-customize-widgets). Please see <a href=”https://developer.ww.wp.xz.cn/advanced-administration/debug/debug-wordpress/”>Debugging in WordPress</a> for more information.

    After some research I was able to fix it by adding the following function, but obviously this isn’t ideal:

    add_action('admin_enqueue_scripts', function () {
    if ( ! function_exists('get_current_screen') ) {
    return;
    }

    $screen = get_current_screen();

    if ( $screen && $screen->id === 'widgets' ) {
    wp_dequeue_script('post-duplicator-gutenberg');
    wp_dequeue_style('post-duplicator-gutenberg');
    }
    }, 1000);

    Could you please look into this? Thanks!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.