Project

General

Profile

Actions

Bug #19166

closed

"Author" option is missing in Quick Edit

Added by Raymond Hoh about 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
WordPress (misc)
Target version:
Start date:
2023-10-31
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

As reported in #19114, the "Author" dropdown menu does not show up when clicking on the "Quick Edit" link in the WP admin dashboard.

Steps to reproduce:
1. Navigate to the "Posts" or "Pages" admin dashboard page
2. In the table, hover over a post or page to edit and click on the "Quick Edit" link
3. The "Author" option is missing

It appears that WordPress put a restriction in place to omit the "Author" dropdown if the entire network's user count is greater than 10,000: https://github.com/WordPress/WordPress/blob/798991a0ff4684363c11bb7c2598dcef203b85e1/wp-admin/includes/class-wp-posts-list-table.php#L1722-L1759. The user count on the Commons exceeds 10,000, so the Author dropdown option is omitted.

We can bypass this restriction with the following snippet:

add_action( 'admin_enqueue_scripts', function( $hook_suffix ) {
    // Bail if not on a post type's dashboard page.
    if ( 'edit.php' !== $hook_suffix ) {
        return;
    }

    // Bypass user count check.
    add_filter( 'wp_is_large_user_count', '__return_false' );
} );

However, I want to know why WordPress put in this restriction in the first place. Boone / Jeremy, is this because the get_users() DB query on 'wp_usermeta' is taxing when there is a large user database? Wouldn't it make more sense for the restriction to count the site's users with count_users() rather than the entire network's user base with wp_is_large_user_count()?


Related issues

Related to CUNY Academic Commons - Bug #19114: Reassigning authors to pages and postsResolvedRaymond Hoh2023-10-26

Actions
Related to CUNY Academic Commons - Bug #20062: Quick Edit Feature Resets Post Author to First User in ListResolvedRaymond Hoh2024-03-26

Actions
Actions

Also available in: Atom PDF