Fatal Error when trying to access widget area
-
Hi!
Thank you very much for this plugin – it’s a joy to use.
However, when trying to access sidebar settings (Design > Widgets) we get the following error. We are using latest version, but have been having this bug with older versions as well.
Any idea how we can fix this?
Fatal error: Uncaught Error: Call to a member function hasTOCItems() on null in /website/wp-content/plugins/easy-table-of-contents/includes/class.widget-toc.php:155 Stack trace: #0 /website/wp-includes/class-wp-widget.php(380): ezTOC_Widget->widget(Array, Array) #1 /website/wp-content/plugins/gutenberg/lib/class-wp-rest-widgets-controller.php(538): WP_Widget->display_callback(Array, Array) #2 /website/wp-content/plugins/gutenberg/lib/class-wp-rest-widgets-controller.php(110): WP_REST_Widgets_Controller->prepare_item_for_response(Array, Object(WP_REST_Request)) #3 /website/wp-includes/rest-api/class-wp-rest-server.php(1160): WP_REST_Widgets_Controller->get_items(Object(WP_REST_Request)) #4 /website/wp-includes/rest-api/class-wp-rest-server.php(1007): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/wp/v2/widge in /website/wp-content/plugins/easy-table-of-contents/includes/class.widget-toc.php on line 155
-
RE: when trying to access sidebar settings (Design > Widgets) we get the following error.
Do you mean
Appearance → Widgets
? If it isDesign > Widgets
that sounds like the widgets are being access via a third-party plugin or theme … or is it in the Customizer?Yes, i mean
Appearance -> Widgets.
Sorry, my fault, bad translation on my part. We are using standard theme, no customizer/third party plugin.
Hi Steven,
any ideas of how to fix this?
Kind regards, Tim
Hello,
I have the same problem with the same process (Appearance > Widgets).
When i want to access in this part :
PHP Fatal error: Uncaught Error: Call to a member function hasTOCItems() on null in /var/www/html/wp-progedo/wp-content/plugins/easy-table-of-contents/includes/class.widget-toc.php:155\nStack trace:\n#0 /var/www/html/wp-progedo/wp-includes/class-wp-widget.php(380): ezTOC_Widget->widget()\n#1 /var/www/html/wp-progedo/wp-content/plugins/gutenberg/lib/class-wp-rest-widgets-controller.php(562): WP_Widget->display_callback()\n#2 /var/www/html/wp-progedo/wp-content/plugins/gutenberg/lib/class-wp-rest-widgets-controller.php(120): WP_REST_Widgets_Controller->prepare_item_for_response()\n#3 /var/www/html/wp-progedo/wp-includes/rest-api/class-wp-rest-server.php(1139): WP_REST_Widgets_Controller->get_items()\n#4 /var/www/html/wp-progedo/wp-includes/rest-api/class-wp-rest-server.php(985): WP_REST_Server->respond_to_request()\n#5 /var/www/html/wp-progedo/wp-includes/rest-api.php(479): WP_REST_Server->dispatch()\n#6 /var/www/html/wp-progedo/wp-includes/rest-api.php(2810): rest_do_request()\n#7 [internal function]: rest_preload_api_request()\n#8 /var in /var/www/html/wp-progedo/wp-content/plugins/easy-table-of-contents/includes/class.widget-toc.php on line 155,
Thanks for this plugin.
Best regards,
SdjI’m not able to replicate this issue. But. I can add an additional check to the code to make sure this error can not occur. I release a minor update either later this week or early next week.
Apologies for the trouble!
Thank you very much, Steven!
hola, ¿me aparece este error como solucionarlo?
Notice: Undefined offset: 1 in /home/electrom/public_html/wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php on line 644
Notice: wp_enqueue_script() se llamó incorrectamente. “wp-editor” script should not be enqueued together with the new widgets editor (wp-edit-widgets or wp-customize-widgets). Por favor, visita Depuración en WordPress para más información. (Este mensaje se añadió en la versión 5.8.0.) in /home/electrom/public_html/wp-includes/functions.php on line 5535
- The topic ‘Fatal Error when trying to access widget area’ is closed to new replies.