[wp-trac] [WordPress Trac] #41424: loose error message: Error establishing a database connection

WordPress Trac noreply at wordpress.org
Mon Jul 24 14:24:45 UTC 2017


#41424: loose error message: Error establishing a database connection
-------------------------+-----------------------------
 Reporter:  tthorp       |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Database     |    Version:  trunk
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 In multisite, if this query returns no results, the database connection
 error is triggered:

 SELECT  blog_id FROM wp_blogs  WHERE domain IN ( 'example.com' ) AND path
 IN ( '/' )  ORDER BY blog_id ASC LIMIT 1

 I think the error should not mention database connection but allude to the
 fact that the site was not found.

 For my use case, I had migrated a production database into QA and didn't
 update the domain to be qa.example.com so the connection failed.

 I hope this is helpful. I'm not sure I know what the exact solution is but
 I thought the connection attempt had failed, when in fact the connection
 had been made but the data was not as expected. Also, the failure was not
 found in debug.log.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41424>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list