Opened 18 years ago
Closed 17 years ago
#6185 closed defect (bug) (wontfix)
Make dead_db()'s terse message more useful
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.5 |
Component: | General | Keywords: | database error has-patch |
Focuses: | Cc: |
Description
I'm not sure why a terse output was desired from dead_db. The terse message isn't particularly helpful unless you know what problems can occur when trying to establish a database connection.
Attached patch removes the terse unfriendly message and uses wp_die() in all cases.
Attachments (1)
Change History (18)
#2
@
18 years ago
I think the terse output is there to prevent potentially leaking connection info to visitors when the DB server is down.
#3
@
18 years ago
The message output by wp_die() discloses the same information as the terse message.
#4
@
18 years ago
We also don't want WP branded messages. If a site is down, that message shows up in all kinds of places with our name on it.
#5
@
18 years ago
No the $wpdb->error message has the db host in it
-1 to the current patch.
With regard to #3471 - are we not returning the correct headers any more?
#6
@
18 years ago
Doesn't appear to be branded in my version. The only mentions of WordPress are in the page's title, which can be fixed, and a link to the support forums.
#7
follow-up:
↓ 8
@
18 years ago
#3471 has nothing to do with this particular problem - just wanted to mention it as a note for myself.
I could replace the message passed to wp_die() if that's the only problem so far :-)
#10
@
18 years ago
The whole idea is that a viewer of an admin page gets a useful error message from WordPress and a viewer of a blog page gets a very plain db error message without any WordPress branding or linkage.
#11
@
18 years ago
Basically, the point of the bland error page was to prevent general users associating a "Database Down" message with that of a WordPress message.
Eg, Digg; Everytime a poorly hosted WordPress install gets submitted, MySQL overloads itself, and WordPress cant connect, it flashes up a "WordPress database down" page, Everyones reaction? "Its another WordPress blog, of course it doesnt work, its absolutly useless", Yes; those people who say that should know better, but the simple fact is, they dont.
Its all about changing the general users view of what wordpress is, You dont want to associate negitive things like that with WordPress.
In its current form, a simple "Database Down" message which doesnt mention the hosting software, makes more sense, it gets whats wrong out there, and doesnt associate it with WordPress.
I'd nearly suggest mentioning MySQL in the error message myself..
#12
@
18 years ago
- Summary changed from Simplify dead_db() to use only wp_die() to Make dead_db()'s terse message more useful
I've created a new patch which I hope addresses mine and everyone else's concerns. I don't care much for mentioning WordPress in the error message either but I do want to provide a more helpful message to users.
#13
@
18 years ago
The terse message should be directed at a passing visitor, not at the blog "owner".
The blog owner gets to see a more detailed message when he tries to go into the admin.
#14
@
18 years ago
Now I've got even more questions :-) ...
If it's intended for visitors and not the user why do we even go as far as mentioning a database problem?
What about users who don't type the admin URL, and only know to follow the wp_loginout() link? I'm sure this is the case for most of my users (who admittedly are far from experts)
Why aren't we passing the terse message to wp_die()
#15
@
18 years ago
The answer to your question is to make wp_die() themeable, so that, the custom solution is not needed.
(As a useful note, #3471 gives some related background)