Critical error on widget screen
-
The client has updated the plugin on a site and looks like there was still an old widget in
It’s all done through code these days so we dont use widgets, but we can’t even get to the widget screen to remove it as it’s throwing a critical error
PHP Fatal error: Uncaught TypeError: preg_match(): Argument #2 ($subject) must be of type string, array given in /wp-includes/formatting.php:1608
Stack trace:
#0 /wp-includes/formatting.php(1608): preg_match('/[\\\\x80-\\\\xff]/', Array)
#1 /wp-includes/formatting.php(2223): remove_accents(Array)
#2 /wp-content/plugins/wordpress-popular-posts/src/Widget/form.php(173): sanitize_title(Array)
#3 /wp-content/plugins/wordpress-popular-posts/src/Widget/Widget.php(186): require('/nas/content/li...')
#4 /wp-includes/class-wp-widget.php(535): WordPressPopularPosts\\Widget\\Widget->form(Array)
#5 /wp-includes/widgets.php(2062): WP_Widget->form_callback(Array)
#6 /wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php(701): wp_render_widget_control('wpp-2')
#7 /wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php(154): WP_REST_Widgets_Controller->prepare_item_for_response(Array, Object(WP_REST_Request))
#8 /wp-includes/rest-api/class-wp-rest-server.php(1230): WP_REST_Widgets_Controller->get_items(Object(WP_REST_Request))
#9 /wp-includes/rest-api/class-wp-rest-server.php(1063): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/wp/v2/widgets', Array, NULL)
#10 /wp-includes/rest-api.php(555): WP_REST_Server->dispatch(Object(WP_REST_Request))
#11 /wp-includes/rest-api.php(2922): rest_do_request(Object(WP_REST_Request))
#12 [internal function]: rest_preload_api_request(Array, '/wp/v2/widgets?...')
#13 /wp-includes/block-editor.php(750): array_reduce(Array, 'rest_preload_ap...', Array)
#14 /wp-admin/widgets-form-blocks.php(26): block_editor_rest_api_preload(Array, Object(WP_Block_Editor_Context))
#15 /wp-admin/widgets.php(32): require('/nas/content/li...')
#16 {main}
thrown in /wp-includes/formatting.php on line 1608We can disable the plugin to get to the widgets screen but when we switch it back on it we get the error again as obviously we can’t delete it if the plugin is inactive
Cheers
Andy
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.