#36215 closed enhancement (wontfix)
Friendlier "headers already sent" error message on wp-login.php
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Login and Registration | Keywords: | ux-feedback good-first-bug has-patch |
Focuses: | Cc: |
Description
When a user first installs WordPress and manually configures their wp-config.php
file, a rogue leading or trailing space, tab, new line, or other character in this file can prevent the user from logging in due to the "headers already sent" error. See #36213 for a recent example.
In order to make this error condition friendlier, wp-login.php
should perform a headers_sent()
check before sending cookies and display a friendlier error message if headers have already been sent. Rather than a verbose error message, a link to a relevant Codex or Handbook article could be provided.
Attachments (2)
Change History (8)
#2
@
7 years ago
Hello,
I think this would be great for newcomers. We should define a string for the error. I've suggested one in my patch.
Also, I've seen there are a lot of non-compliant code regarding the WP coding standards. Wouldn't be this a good opportunity to work a bit around this file?
We can also add some html to make the message look prettier. Should I try something out? (Something somehow closer to the look and feel of the login page).
Regards,
Juanfra.
#3
@
7 years ago
- Keywords has-patch added; needs-patch removed
- Owner set to juanfra
- Status changed from new to assigned
Assigning to mark the good-first-bug as "claimed".
See 36215.patch
#4
@
7 years ago
- Milestone changed from Future Release to 4.7
- Owner changed from juanfra to johnbillion
- Status changed from assigned to reviewing
- Type changed from feature request to enhancement
#5
@
7 years ago
- Milestone 4.7 deleted
- Resolution set to wontfix
- Status changed from reviewing to closed
It turns out that this functionality is already in place. See the above screenshot.
I thought about suppressing the Cannot modify header information - headers already sent
errors that appear if error output is enabled, but this actually proves to be a very effective phrase to search for in addition to following the links in the above message.
Great idea!