Bug #8675

Add new User search screen calls for the input of email address but doesn't work with one

Added by Paul Hebert over 1 year ago. Updated over 1 year ago.

Reporter Feedback
Priority name:
Category name:
User Onboarding
Target version:
Start date:
Due date:
% Done:


Estimated time:


I noticed this morning that on the Add New User screen for blogs you're directed to input an email address, but the search box doesn't seem to work with one. I entered several email addresses of users I know to be on the Commons (using those same email addresses) and no one came up. I also failed to get the confirmation screen when I entered an email address. The box seems to only take names or usernames. I can search for myself by my first name, for example, or my username, but when I put in my email address I don't come up (this was true for others as well).

I'm not sure what the easiest solution is, changing the directions to ask for name/username input or adding the ability to search by email address.

Screenshot_2017-09-11_20-38-38.png (131 KB) Screenshot_2017-09-11_20-38-38.png Boone Gorges, 2017-09-11 09:40 PM


#1 Updated by Matt Gold over 1 year ago

  • Category name set to User Onboarding
  • Status changed from New to Assigned
  • Assignee set to Boone Gorges

#2 Updated by Boone Gorges over 1 year ago

Thanks for the report, Paul. I'm unable to reproduce. Whether logged in as a super admin or not, I'm able to type a word like 'gmail' or 'kbcc' into the 'Email' field at wp-admin/user-new.php, and many results show up. It's true that the results don't display the matched email - just the user's display name and login.

Can you confirm by looking at the attached screenshot that I'm looking in the right place?

#3 Updated by Paul Hebert over 1 year ago

You are looking in the right place.

So, I tried to recreate what you did and I could. So then I tried to recreate what I did and something strange happened.

I copy/pasted an email address from an email into the field. It included a space before the first character (because it was from an email) and I deleted it, apparently before it had finished the search. The search bar got hung up. The circle kept moving and nothing came of it.

I don't recall the circle moving the first time I did this, so I tried it from scratch again. I reloaded the page and copy pasted. With the space, after a moment, it worked.

So I tried it again from scratch. I reloaded and copy/pasted with the space but this time deleted it before I saw the search results. The hang-up happened again. No matter what I put into that box, once it was hung up (based on the revolving circle), nothing would show up.

So what I think happened is that I deleted the space quickly enough that that search function got hung up. Then, since I kept putting addresses in the same field (without reloading the page), none showed up. Eventually I tried a few other dashboard places and then came back and searched instead by username, which worked.

So maybe this is one of those limit-cases where something just weird happens if you do the right number of steps with the right browser?

#4 Updated by Boone Gorges over 1 year ago

Thanks for following up on this, Paul. I've just spent a bit of time trying to break things, but I've been unsuccessful. Any combination of pasting, typing, deleting, waiting, not-waiting, etc - nothing seems to break the autocomplete. It does sometimes take a few seconds for the autocomplete request to complete, but this is due to latency rather than any bug.

If you're able to reproduce regularly, could you please open your browser tools to detect any errors? Hit F11. Look for Console errors as you reproduce. Then, check the Network tab (assuming you have one), filtering by XHR requests if necessary, to see if you're getting bad requests (non-200).

#5 Updated by Paul Hebert over 1 year ago

I AM able to reproduce regularly. This time by just copy/pasting an email address again.

There was a 404 error: Failed to load resource: the server responded with a status of 404 (Not Found)

This is from the network tab (new entries are showing up periodically):

admin-ajax.php 200 xhr jquery.js?ver=1.12.4-1.11.12:4 532 B 799 ms
admin-ajax.php 200 xhr jquery.js?ver=1.12.4-1.11.12:4 532 B 800 ms

#6 Updated by Boone Gorges over 1 year ago

Thanks, Paul. Can you take a screenshot of the error? It's helpful to know that there's a 404, but I'll also need to know exactly what request is triggering the 404 - the admin-ajax.php calls you reference are getting 200 responses. If possible, please also expand the entry in the console, so that I can see the headers etc for the 404 request.

#7 Updated by Raymond Hoh over 1 year ago

This time by just copy/pasting an email address again.

Copying and pasting an email address into the input field would still require a keyboard press into the input box to trigger an AJAX search.

Paul, did you try pasting an email address and then typing a letter and deleting it inside the input field?

#8 Updated by Boone Gorges over 1 year ago

  • Target version set to Future release

Hi Paul - When you get a chance, would you mind following up on the most recent comments by Ray and me above? Thank you!

Also available in: Atom PDF