简体   繁体   中英

WordPress Customizer Links Stopped Working Since WP5.8 Update

My WordPress Customizer Menu Items stopped working since WP 5.8 Update. So Im not able to click on any of the items like Widgets, Settings or even Changing the theme. No buttons are working in the customizer.

When I use the same theme in WP 5.5 it works 100%

I tried activating the Enable jQuery Migrate Helper Plugin but the problem still persist. So Im sure it is something to do with the theme Im using. I need to fix the problem.

This is the error Im getting in the Dev Tools Console

Uncaught TypeError: t.onChangeSectionExpanded is not a function
    completeCallback http://localhost/atomx/wp-includes/js/dist/customize-widgets.min.js?ver=54217cb151203a814dd21ea6d0b8763c:2
    completeCallback http://localhost/atomx/wp-includes/js/dist/customize-widgets.min.js?ver=54217cb151203a814dd21ea6d0b8763c:2
    onChangeExpanded http://localhost/atomx/wp-admin/js/customize-controls.min.js?ver=5.8:2
    onChangeExpanded http://localhost/atomx/wp-includes/js/dist/customize-widgets.min.js?ver=54217cb151203a814dd21ea6d0b8763c:2
    _toggleExpanded http://localhost/atomx/wp-admin/js/customize-controls.min.js?ver=5.8:2
    collapse http://localhost/atomx/wp-admin/js/customize-controls.min.js?ver=5.8:2
    onChangeExpanded http://localhost/atomx/wp-admin/js/customize-controls.min.js?ver=5.8:2
    jQuery 3
    onChangeExpanded http://localhost/atomx/wp-admin/js/customize-controls.min.js?ver=5.8:2
    initialize http://localhost/atomx/wp-admin/js/customize-controls.min.js?ver=5.8:2
    jQuery 3
    _toggleExpanded http://localhost/atomx/wp-admin/js/customize-controls.min.js?ver=5.8:2
    expand http://localhost/atomx/wp-admin/js/customize-controls.min.js?ver=5.8:2
    attachEvents http://localhost/atomx/wp-admin/js/customize-controls.min.js?ver=5.8:2
    jQuery 9
    attachEvents http://localhost/atomx/wp-admin/js/customize-controls.min.js?ver=5.8:2
    initialize http://localhost/atomx/wp-admin/js/customize-controls.min.js?ver=5.8:2
    jQuery 3
    e http://localhost/atomx/wp-admin/js/customize-controls.min.js?ver=5.8:2
    embed http://localhost/atomx/wp-admin/js/customize-controls.min.js?ver=5.8:2
    initialize http://localhost/atomx/wp-admin/js/customize-controls.min.js?ver=5.8:2
    jQuery 3
    <anonymous> http://localhost/atomx/wp-admin/js/customize-controls.min.js?ver=5.8:2
    each jQuery
    <anonymous> http://localhost/atomx/wp-admin/js/customize-controls.min.js?ver=5.8:2
    jQuery 13
customize-widgets.min.js:2:22838

Can anyone please point me in the right direction. I need to use this theme. I have no plugin activated so Im sure it has to do with the theme Im using.

Im working on localhost so not able to share a live URL. Latest version of WP and Wamp64

Thanks in advance.

I have tried so many things over the last few days.

A few suggestions were:

  1. .live jQuery function - Replace it with .on JQ function with a few additional adjustments. - Did not work
  2. Activate the classic editor plugin - https://wordpress.org/plugins/classic-editor/ - Did not work
  3. Activate the jQuery Migrate plugin - https://wordpress.org/plugins/enable-jquery-migrate-helper - Did not work
  4. Remove gutenberg support by placing remove_theme_support( 'widgets-block-editor' ) in functions file - Did not work

The more I read about the issue it sounded like it was the new widgets section causing it. So I then saw WordPress brought out a new plugin called Classic Widgets. Once I activated this plugin it fixed my issue immediately.

So for anyone else running into this issue. Check out the classic widgets plugin - https://wordpress.org/plugins/classic-widgets/

This is pretty much all it does

// Disables the block editor from managing widgets in the Gutenberg plugin.
add_filter( 'gutenberg_use_widgets_block_editor', '__return_false' );
// Disables the block editor from managing widgets.
add_filter( 'use_widgets_block_editor', '__return_false' );

So instead of using that plugin you can add the above 2 lines to your functions.php file then that should fix it.

Hope this will save someone 4 days of struggling like I did. Now I need to figure out why it is breaking the theme when using New Block Widgets.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM