Can’t access WordPress widgetsto fix critical error

27 Views Asked by At

I can access WordPress dashboard, but when I try to access "Widgets" it gives an critical error. I received the below error mail and are not sure how to fix this? Is this a widget error or a "Woocommerce-drop-down-cart" error? (Evertything on the website seems fine.)

An error of type E_ERROR was caused in line 47 of the file /home/ttcc001/public_html/wp-content/themes/bridge/framework/modules/woocommerce/widgets/woocommerce-dropdown-cart.php. Error message: Uncaught Error: Call to a member function is_empty() on null in /home/ttcc001/public_html/wp-content/themes/bridge/framework/modules/woocommerce/widgets/woocommerce-dropdown-cart.php:47
Stack trace:
#0 /home/ttcc001/public_html/wp-includes/class-wp-widget.php(394): BridgeQodeWoocommerceDropdownCart->widget()
#1 /home/ttcc001/public_html/wp-includes/widgets.php(2026): WP_Widget->display_callback()
#2 /home/ttcc001/public_html/wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php(697): wp_render_widget()
#3 /home/ttcc001/public_html/wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php(154): WP_REST_Widgets_Controller->prepare_item_for_response()
#4 /home/ttcc001/public_html/wp-includes/rest-api/class-wp-rest-server.php(1193): WP_REST_Widgets_Controller->get_items()
#5 /home/ttcc001/public_html/wp-includes/rest-api/class-wp-rest-server.php(1041): WP_REST_Server->respond_to_request()
#6 /home/ttcc001/public_html/wp-includes/rest-api.php(551): WP_REST_Server->dispatch()
#7 /home/ttcc001/public_html/wp-includes/rest-api.php(2918): rest_do_request()
#8 [internal function]: rest_preload_api_request()
#9 /home/ttcc001/public_html/wp-includes/block-editor.php(753): array_reduce()
#10 /home/ttcc001/public_html/wp-admin/widgets-form-blocks.php(26): block_editor_rest_api_preload()
#11 /home/ttcc001/public_html/wp-admin/widgets.php(32): require('/home/ttcc001/p...')
#12 {main}
thrown```


I wanted to access the "widget" section from Appearance > Widgets, but it gives the "There has been a critical error on this website. Please check your site admin email inbox for instructions." error. 
I thought maybe it is a Woocommerce widget that is causing the problem, since the error message said: "Error message: Uncaught Error: Call to a member function is_empty() on null in /home/ttcc001/public_html/wp-content/themes/bridge/framework/modules/woocommerce/widgets/woocommerce-dropdown-cart.php:47."
1

There are 1 best solutions below

0
Sue On

I installed the "classic Widget" plugin and the error was resolved.