Author selector becomes unusable on sites with many authors #67331
Labels
REST API Interaction
Related to REST API
[Type] Bug
An existing feature does not function as intended
Description
The current author selector implementation has a few limitations that make it unusable on sites greatly exceeding 50 authors:
user_login
,user_email
, anduser_nicename
Impact
Some authors are inaccessible.
If an author is not in the first 50 alphabetical entries, they can only be chosen if they are found by search. However, search limitations may make that impossible. Imagine the scenario of a company with 2000 authors with "@stevesburgers.com" email addresses. If you search "Steve", looking for "Steve Smith", it's quite likely that no results will be displayed. This is because the backend will return the first 50 users with "Steve" in their email - Likely employees with names beginning with A-C because they come first alphabetically - and the frontend will filter them all out, because the frontend is looking for the string "Steve" in the name fields, not the email. The actual "Steve Smith" user will not be returned by the backend since it's past the 50 user cutoff, and the frontend won't get a chance to render it.
Expected Behavior
Technical Details
Current REST API endpoint (
/wp/v2/sites/{site}/users
) uses these arguments:The resulting SQL includes email in search:
Possible Solutions
Impact
This affects any WordPress site with more than 50 authors, but is particularly problematic for:
See Also
Note that #15994 is related but it doesn't seem to cover the frontend/backend search mismatch.
Step-by-step reproduction instructions
Steps to Reproduce
Screenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: