Title: Critical error on widgets.php
Last modified: August 31, 2021

---

# Critical error on widgets.php

 *  Resolved [kalvink](https://wordpress.org/support/users/kalvink/)
 * (@kalvink)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/critical-error-on-widgets-php/)
 * I can’t access my widgets page, I’m not sure what’s wrong could someone please
   help me.
 *     ```
       Compare products
   
       Fatal error: Uncaught Error: Call to undefined method YITH_Woocompare_Admin::list_products_html() in E:\xampp\apps\wordpress\htdocs\wp-content\plugins\yith-woocommerce-compare\widgets\class.yith-woocompare-widget.php:47 Stack trace: #0 E:\xampp\apps\wordpress\htdocs\wp-includes\class-wp-widget.php(393): YITH_Woocompare_Widget->widget(Array, Array) #1 E:\xampp\apps\wordpress\htdocs\wp-includes\widgets.php(1977): WP_Widget->display_callback(Array, Array) #2 E:\xampp\apps\wordpress\htdocs\wp-includes\rest-api\endpoints\class-wp-rest-widgets-controller.php(630): wp_render_widget('yith-woocompare...', 'sidebar-2') #3 E:\xampp\apps\wordpress\htdocs\wp-includes\rest-api\endpoints\class-wp-rest-widgets-controller.php(122): WP_REST_Widgets_Controller->prepare_item_for_response(Array, Object(WP_REST_Request)) #4 E:\xampp\apps\wordpress\htdocs\wp-includes\rest-api\class-wp-rest-server.php(1140): WP_REST_Widgets_Controller->get_items(Object(WP_REST_Request)) #5 E:\xampp\apps\wordpress\htdocs\wp-includes\rest-api\class-wp-rest-server.php(987): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/wp/v2/widgets', Array, NULL) #6 E:\xampp\apps\wordpress\htdocs\wp-includes\rest-api.php(495): WP_REST_Server->dispatch(Object(WP_REST_Request)) #7 E:\xampp\apps\wordpress\htdocs\wp-includes\rest-api.php(2832): rest_do_request(Object(WP_REST_Request)) #8 [internal function]: rest_preload_api_request(Array, '/wp/v2/widgets?...') #9 E:\xampp\apps\wordpress\htdocs\wp-includes\block-editor.php(444): array_reduce(Array, 'rest_preload_ap...', Array) #10 E:\xampp\apps\wordpress\htdocs\wp-admin\widgets-form-blocks.php(25): block_editor_rest_api_preload(Array, Object(WP_Block_Editor_Context)) #11 E:\xampp\apps\wordpress\htdocs\wp-admin\widgets.php(31): require('E:\\xampp\\apps\\w...') #12 {main} thrown in E:\xampp\apps\wordpress\htdocs\wp-content\plugins\yith-woocommerce-compare\widgets\class.yith-woocompare-widget.php on line 47
       There has been a critical error on this website. Please check your site admin email inbox for instructions.
   
       Learn more about troubleshooting WordPress.
       ```
   
 * `Tue Aug 31 02:13:23.290125 2021] [php:error] [pid 4436:tid 1804] [client 127.0.0.1:
   55589] PHP Fatal error: Uncaught Error: Call to undefined method YITH_Woocompare_Admin::
   list_products_html() in E:\\xampp\\apps\\wordpress\\htdocs\\wp-content\\plugins\\
   yith-woocommerce-compare\\widgets\\class.yith-woocompare-widget.php:47\nStack
   trace:\n#0 E:\\xampp\\apps\\wordpress\\htdocs\\wp-includes\\class-wp-widget.php(
   393): YITH_Woocompare_Widget->widget(Array, Array)\n#1 E:\\xampp\\apps\\wordpress\\
   htdocs\\wp-includes\\widgets.php(1977): WP_Widget->display_callback(Array, Array)\
   n#2 E:\\xampp\\apps\\wordpress\\htdocs\\wp-includes\\rest-api\\endpoints\\class-
   wp-rest-widgets-controller.php(630): wp_render_widget('yith-woocompare...', '
   sidebar-2')\n#3 E:\\xampp\\apps\\wordpress\\htdocs\\wp-includes\\rest-api\\endpoints\\
   class-wp-rest-widgets-controller.php(122): WP_REST_Widgets_Controller->prepare_item_for_response(
   Array, Object(WP_REST_Request))\n#4 E:\\xampp\\apps\\wordpress\\htdocs\\wp-includes\\
   rest-api\\class-wp-rest-server.php(1140): WP_REST_Widgets_Controller->get_items(
   Object(WP_REST_Request))\n#5 E:\\xampp\\apps\\wordpress\\htdocs\\wp-includes\\
   rest-api\\class-wp-rest-server.php(987): WP_REST_Server->respond_to_request(Object(
   WP_REST_Request), '/wp/v2/widgets', Array, NULL)\n#6 E:\\xampp\\apps\\wordpress\\
   htdocs\\wp-includes\\rest-api.php(495): WP_REST_Server->dispatch(Object(WP_REST_Request))\
   n#7 E:\\xampp\\apps\\wordpress\\htdocs\\wp-includes\\rest-api.php(2832): rest_do_request(
   Object(WP_REST_Request))\n#8 [internal function]: rest_preload_api_request(Array,'/
   wp/v2/widgets?...')\n#9 E:\\xampp\\apps\\wordpress\\htdocs\\wp-includes\\block-
   editor.php(444): array_reduce(Array, 'rest_preload_ap...', Array)\n#10 E:\\xampp\\
   apps\\wordpress\\htdocs\\wp-admin\\widgets-form-blocks.php(25): block_editor_rest_api_preload(
   Array, Object(WP_Block_Editor_Context))\n#11 E:\\xampp\\apps\\wordpress\\htdocs\\
   wp-admin\\widgets.php(31): require('E:\\\\xampp\\\\apps\\\\w...')\n#12 {main}\
   n thrown in E:\\xampp\\apps\\wordpress\\htdocs\\wp-content\\plugins\\yith-woocommerce-
   compare\\widgets\\class.yith-woocompare-widget.php on line 47, referer: http://
   127.0.0.1/wordpress/`
    -  This topic was modified 4 years, 9 months ago by [kalvink](https://wordpress.org/support/users/kalvink/).
    -  This topic was modified 4 years, 9 months ago by [kalvink](https://wordpress.org/support/users/kalvink/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Jamie](https://wordpress.org/support/users/codente/)
 * (@codente)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/critical-error-on-widgets-php/#post-14824312)
 * Sounds like a problem with the plugin YITH_Woocompare_Admin.
 * Have you tried deactivating that to see if it resolves your issue? If it does,
   then please report that to the plugin developers so they can address it as they
   said a week ago they fixed the issue (See: [https://wordpress.org/support/topic/fatal-error-undefined-list_products_html-wp-5-8-woo-5-5-2/](https://wordpress.org/support/topic/fatal-error-undefined-list_products_html-wp-5-8-woo-5-5-2/))
 * If you are not using the latest version of that plugin, please try updating that
   plugin first before deactivating it.
 *  Thread Starter [kalvink](https://wordpress.org/support/users/kalvink/)
 * (@kalvink)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/critical-error-on-widgets-php/#post-15009884)
 * resolved thank you
    -  This reply was modified 4 years, 7 months ago by [kalvink](https://wordpress.org/support/users/kalvink/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Critical error on widgets.php’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [kalvink](https://wordpress.org/support/users/kalvink/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/critical-error-on-widgets-php/#post-15009884)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
