Automattic / Automattic/co-authors-plus
Cannot add an author with a one character long name
- Dominant language
- PHP
- Stars
- 322
- Forks
- 216
- Avg merge
- 7h 50m
- Merged PRs (30d)
- 65
Description
Some people have names which are one character in length. A guest author with such a name cannot be assigned as the author of a post by typing their name.
Steps to reproduce:
- Visit "Add New Guest Author" page ( /wp-admin/post-new.php?post_type=guest-author )
- Enter "A" in "Display Name"
- Click "Add New Guest Author"
- Visit the new post page ( /wp-admin/post-new.php )
- Enter "A" in "Search for an author"
The list of search suggestions never appears.
As a workaround, you can use the guest author's ID (found in the URL when you're editing the guest author). That is assuming the guest author's ID is over 1 digit long.
Merely updating the call to `suggest()` in `js/co-authors-plus.js` to `suggest(..., { ..., minchars: 1 })` doesn't consistently work. Sometimes the dropdown appears after typing 1 character and sometimes it doesn't. I didn't do any further work on creating a PR for this bug.
Contributor guide
Research direction
Start by reproducing the one-character guest-author search from the WordPress admin steps in the issue, then inspect js/co-authors-plus.js and its suggest() call. Verify the behavior with a one-character display name and confirm that the matching suggestion appears reliably without relying on the guest-author ID.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, wordpress
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100