Undefined array key “hook_suffix” and WP_List_Table
-
I’m missing something basic here in plugin setup regarding the hood_suffix but I haven’t been able to find out exactly what is wrong.
I get a lot of hook_suffix undefined errors with my test_plugin while using WP_List_Table.
[04-Apr-2022 19:10:26 UTC] PHP Warning: Undefined array key "hook_suffix" in /var/www/html/wp-admin/includes/class-wp-screen.php on line 223 [04-Apr-2022 19:10:26 UTC] PHP Stack trace: [04-Apr-2022 19:10:26 UTC] PHP 1. {main}() /var/www/html/wp-admin/admin-ajax.php:0 [04-Apr-2022 19:10:26 UTC] PHP 2. do_action($hook_name = 'admin_init') /var/www/html/wp-admin/admin-ajax.php:45 [04-Apr-2022 19:10:26 UTC] PHP 3. WP_Hook->do_action($args = [0 => '']) /var/www/html/wp-includes/plugin.php:474 [04-Apr-2022 19:10:26 UTC] PHP 4. WP_Hook->apply_filters($value = '', $args = [0 => '']) /var/www/html/wp-includes/class-wp-hook.php:331 [04-Apr-2022 19:10:26 UTC] PHP 5. Test_plugin_Admin_Settings->initialize_members('') /var/www/html/wp-includes/class-wp-hook.php:307 [04-Apr-2022 19:10:26 UTC] PHP 6. Test_plugin_Table->__construct($plugin_name = 'test_plugin', $version = '1.0.0') /var/www/html/wp-content/plugins/test_plugin/admin/class-test_plugin-admin-settings.php:318 [04-Apr-2022 19:10:26 UTC] PHP 7. Test_plugin_Table->__construct($args = ['singular' => 'item', 'plural' => 'items', 'ajax' => FALSE]) /var/www/html/wp-content/plugins/test_plugin/admin/class-test_plugin-admin-tables.php:24 [04-Apr-2022 19:10:26 UTC] PHP 8. convert_to_screen($hook_name = NULL) /var/www/html/wp-admin/includes/class-wp-list-table.php:149 [04-Apr-2022 19:10:26 UTC] PHP 9. WP_Screen::get($hook_name = NULL) /var/www/html/wp-admin/includes/template.php:2583The plugin has been working for some time successfully, but I’ve been unable to figure out the source of this warning.
Any help in understanding where to look or what to try would be appreciated.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Undefined array key “hook_suffix” and WP_List_Table’ is closed to new replies.