Opened 4 years ago
Closed 4 years ago
#52573 closed defect (bug) (fixed)
user-edit.php throw an empty error notice after clicking the password reset button
Reported by: | audrasjb | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.7 | Priority: | normal |
Severity: | normal | Version: | 5.7 |
Component: | Users | Keywords: | has-patch dev-feedback has-screenshots |
Focuses: | ui | Cc: |
Description
Related: #34281
On local instals of WordPress, the reset password email workflow may not be available. The issue is that the error notice is empty, so we don't have any information about the error.
See attached screenshot below.
Attachments (3)
Change History (8)
#2
@
4 years ago
Thanks for the patch! I have some concerns about the approach:
- The
success
parameter is documented as a boolean value, why are we comparing it to a string? - The
message
parameter is documented as a string, why are we extracting it from an array?
It seems like the addInlineNotice()
function is not being used correctly here.
#3
@
4 years ago
Good points. I didn't dig so much into the issue, I only spotted that in case we have an error, the message
variable contains an array, so it can't be displayed as a string in the notice paragraph:
0: [ code: "retrieve_password_email_failure" message: "<strong>Error</strong>: The email could not be sent. Your site may not be correctly configured to send emails. <a href="https://wordpress.org/support/article/resetting-your-password/">Get support for resetting your password</a>." ]
But I'll leave this to more JS savvy people :)
Note: See
TracTickets for help on using
tickets.
After patch