[wp-trac] [WordPress Trac] #41424: Use a better error message than "Error establishing a database connection" when site isn't found
WordPress Trac
noreply at wordpress.org
Wed Nov 22 06:12:04 UTC 2017
#41424: Use a better error message than "Error establishing a database connection"
when site isn't found
------------------------------------------+-----------------------------
Reporter: tthorp | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Database | Version: 4.9
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses: multisite
------------------------------------------+-----------------------------
Changes (by jeremyfelt):
* keywords: => needs-patch needs-unit-tests
* milestone: Awaiting Review => Future Release
Comment:
It does seem like there's room to improve here.
For this scenario, adding `/wp-admin/` to the URL will get a more
descriptive (though still confusing) message that includes this text:
"Could not find site src.wordpress-develop.dev. Searched for table
wp_blogs in database wordpress_develop. Is that right?"
That's probably more along the lines of what we can do. Really, we could
think about using `wp_die()` in `ms_load_current_site_and_network()`
rather than returning `false` and causing `dead_db()`. A similar thing
happens when a network cannot be found.
Is it okay to expose the table and database name or should we have
something more general? I know we expose all of this behind `/wp-admin/`
which kind of defeats the purpose of the obfuscation. :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41424#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list