#22039 closed defect (bug) (fixed)
Undefined index: hook_suffix notice on wp_ajax_get_comments
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | 3.5 |
Component: | Comments | Keywords: | has-patch |
Focuses: | Cc: |
Description
This is part 1 of a two part bug on displaying comments on post.php
The undifined index notice in the ajax response causes the error "an unidentified error has occurred" in the Comments post meta box.
( ! ) Notice: Undefined index: hook_suffix in /Users/chris/Sites/wp-trunk/wp-admin/includes/screen.php on line 401 Call Stack # Time Memory Function Location 1 0.0004 254360 {main}( ) ../admin-ajax.php:0 2 0.2893 18405672 do_action( ) ../admin-ajax.php:69 3 0.2894 18407160 call_user_func_array ( ) ../plugin.php:406 4 0.2894 18407192 wp_ajax_get_comments( ) ../plugin.php:406 5 0.2895 18408880 _get_list_table( ) ../ajax-actions.php:682 6 0.2920 18603376 WP_Comments_List_Table->__construct( ) ../list-table.php:49 7 0.2921 18604688 WP_List_Table->__construct( ) ../class-wp-comments-list-table.php:36 8 0.2921 18605480 convert_to_screen( ) ../class-wp-list-table.php:88 9 0.2921 18605480 WP_Screen::get( ) ../template.php:1873
Calling global $hook_suffix; in WP_Screen::get(); fixes the notice.
Related #21101
Attachments (1)
Change History (8)
#4
@
12 years ago
- Owner set to ryan
- Resolution set to fixed
- Status changed from new to closed
In [22085]:
This ticket was mentioned in IRC in #wordpress-dev by tripflex. View the logs.
11 years ago
#6
@
11 years ago
As you can see from IRC log I was getting this warning when pulling list table via ajax. I used the original patch where it sets the var first (global $hook_suffix; $id = $hook_suffix;) and no longer get warning.
Was this left as using $GLOBALShook_suffix? to make sure this warning is output?
Note: See
TracTickets for help on using
tickets.
Confirmed.