#33406 closed defect (bug) (fixed)
Creating a new user without a password causes error message issues
Reported by: | morganestes | Owned by: | chriscct7 |
---|---|---|---|
Milestone: | 4.3.1 | Priority: | normal |
Severity: | normal | Version: | 4.3 |
Component: | Users | Keywords: | has-patch needs-testing needs-screenshots |
Focuses: | ui, administration | Cc: |
Description
- Visit http://local.wordpress.dev/wp-admin/user-new.php and enter the username and email.
- Clear the generated password and click the "Add New User" button.
- Error message appears and input focuses with red outline, but icon appears below the rest of the inputs instead of next to the problematic one.
Trying to fix the error message:
- Click "Cancel" button next to password input.
- Observe new password is generated with "Strong" level.
- Visual error indicators (red outline & icon) don't go away until after saving.
Related: #32589
Attachments (5)
Change History (24)
#1
follow-up:
↓ 2
@
9 years ago
- Keywords needs-patch added
This should be tagged as version of 4.3 as soon as Obenland finishes with the release process, since it just went out the door.
#2
in reply to:
↑ 1
@
9 years ago
Replying to chriscct7:
This should be tagged as version of 4.3 as soon as Obenland finishes with the release process, since it just went out the door.
Yep. I hit submit a couple of minutes too soon.
This ticket was mentioned in Slack in #core by liljimmi. View the logs.
9 years ago
#6
in reply to:
↑ 5
@
9 years ago
- Owner set to chriscct7
- Status changed from new to assigned
Replying to liljimmi:
I removed the error icon from the td for
.user-pass1-wrapand added it to
.password-input-wrapper
While I agree at first glance that appears to be a nice enhancement, does it solve the problem the ticket is about? Will test it later tonight. If not, that's fine we can split it off and get it into a release just the same
#7
follow-up:
↓ 9
@
9 years ago
I tested 33406.patch and while this does move the error icon to the correct location, I agree with @chriscct7 it does completely resolve the ticket - it does not fix the other issue: the error icon doesn't go away once you enter a password like it does with the username and email fields. Also, testing with show/hide on/off gave me different results.
What's happening is the validation JavaScript is hooked to the original password field, while what you are editing is the text version of field - a copy we maintain to achieve Internet Explorer 8 compatibility (IE 8 considers the type property read only, so the field can't be changed from password to text). You can see this by switching to the password view and trying your test again... screencast.
To fix: Maybe we can add a validation failure class to the wrapper, then use css to apply the styling to the currently visible field? Also: the callbacks that clear the error status when you enter a password need to be tied to both fields or trigger on the pw-changed event.
@liljimmi - would you like to try working on a revamped patch?
This ticket was mentioned in Slack in #core-passwords by sam. View the logs.
9 years ago
#9
in reply to:
↑ 7
@
9 years ago
@liljimmi - would you like to try working on a revamped patch?
Unfortunately I am not a JavaScript expert so I have to pass. :-)
#10
@
9 years ago
- Keywords has-patch dev-feedback needs-testing added; needs-patch removed
- Fixes placement of the error icon with css from @liljimmi
- Adjust JavaScript callback so field gets callback, blurring non empty field now clears the error icon, so if you clear the password, try to create a user, get an error, then add a password, the error icon goes away.
- Currently clicking cancel and show password fills in the old password and no change is triggered - leaving the error icon visible, that may need fixing or may be fixed when #33450 lands. easy fix, clicking cancel should clear the error class.
- Needs testing on mobile to validate css changes
Screencast of the patched new user flow (ignore the LastPass icons visible in the fields please)
#12
@
9 years ago
- Keywords fixed-major added; dev-feedback removed
- Resolution fixed deleted
- Status changed from closed to reopened
Reopen for 4.3.
#13
follow-up:
↓ 14
@
9 years ago
- Click "Cancel" button next to password input.
- Observe new password is generated with "Strong" level.
- Visual error indicators (red outline & icon) don't go away until after saving.
Point 3 is still valid after [34068].
#14
in reply to:
↑ 13
@
9 years ago
- Keywords fixed-major removed
The issue is that generatePassword()
doesn't trigger a change
event, only pwupdate
. Triggering the change
event seems to work, at least in Chrome. But maybe we should use a custom event, see 33406.3.patch.
Error icon below input