Skip to content

Bug: Quick Edit in User Groups PHP Error #654

@mikeyarce

Description

@mikeyarce

Expected/Desired Behavior

No PHP Errors when using Quick Edit

Actual Behavior

PHP Error:

[07-Jun-2021 17:34:31 UTC] PHP Warning:  Undefined array key "hook_suffix" in /wp-admin/includes/class-wp-screen.php on line 223

In the console:

component: "Plugin: Edit-Flow"
file: "wp-admin/includes/class-wp-screen.php"
key: "d5841370c9175d9d14dff829bd2b4b69"
line: 224
message: "Undefined array key \"hook_suffix\""
stack: Array(6)
0: "WP_Screen::get()"
1: "convert_to_screen()"
2: "WP_List_Table->__construct()"
3: "EF_Usergroups_List_Table->__construct()"
4: "EF_User_Groups->handle_ajax_inline_save_usergroup()"
5: "do_action('wp_ajax_inline_save_usergroup')"
length: 6
__proto__: Array(0)
type: "warning"
__proto__: Object

Steps to Reproduce the Problem

  1. Go to Edit Flow -> User Groups
  2. Click Quick Edit
  3. Make a change
  4. Click "Update User Group"

(Optional) Additional notes

I think the problem is here: https://github.com/Automattic/Edit-Flow/blob/master/modules/user-groups/user-groups.php#L1097-L1103

The __construct() should have screen because the method WordPress uses to determine this doesn't run when an AJAX call is made.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions