Download & Extend

Usability: intelligent connection error handling during install

Project:Drupal core
Version:7.x-dev
Component:install system
Category:task
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

My Unix host does not use localhost to access the database, and I inadvertently overlooked the Advanced settings where the database host can be entered.

Is it not possible to check whether localhost is valid, and if not, automatically open the Advanced setting options?

Comments

#1

Version:6.0-beta4» 7.x-dev
Category:bug report» feature request
Status:active» closed (won't fix)

how could we check that there is a mysql running on localhost? that's impossible.

#2

Title:localhost database does not exist» Usability: intelligent connection error handling during install
Component:install system» usability
Priority:minor» normal
Status:closed (won't fix)» active

Interesting idea. Promoting to "Usability".

If no server is running under localhost and you don't change the parameters in the collapsed "Advanced options" fieldset, the installer returns the cryptic error message: "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'". Maybe we could handle error messages intelligently and form_set_error the relevant fields depending on the error (ie. Host in case of a connection error, User and Password for an authentication error, etc.).

#3

Component:usability» install system
Category:feature request» task

Identified at UB Usability Testing: http://www.drupalusability.org/node/12

We get a form set error on the database name if field is empty, but no other field identifiable errors.

#4

This issue does not correspond to the issue found at UBUserTesting2009, that one was related to wrong password/username (although this one is related - its in the error) - I don't think it is part.

#5

Status:active» needs review

The two issues are closely related -- as the error for both connection and login are handled as one.
Here's a patch to make things a bit more user friendly :)
[this is a small bugfix patch, just to get things reasonable ;). If it goes through I'll work on making the error handling intelligent and more helpful]

before screenshot
after screenshot

please review?

thanks,
Jared

AttachmentSizeStatusTest resultOperations
installation_error_handling.patch3.32 KBIdleUnable to apply patch installation_error_handling.patchView details

#6

jabapyth, could you roll a 'regular' patch?

#7

When creating patches, please use the options -up.

#8

Ah, that's how it's done. sorry, couldn't seem to find the right arguments.

AttachmentSizeStatusTest resultOperations
installation_error_handling_regular.patch2.82 KBIdleFailed: 11856 passes, 4 fails, 1 exceptionView details

#9

Status:needs review» needs work

The code comments need some work; better explanation and conform to our coding style.

<b>%error.</b> should be: <strong>%error</strong>. -- also note the position of the point.

Otherwise looks good to me.

#10

Status:needs work» needs review

Updated to address Dries code comment style and HTML issues.

AttachmentSizeStatusTest resultOperations
202775.patch2.83 KBIdlePassed: 11885 passes, 0 fails, 0 exceptionsView details

#11

Status:needs review» needs work

The last submitted patch failed testing.

#12

Status:needs work» needs review

testbot failure.

#13

This looks good to me, but I haven't tested it. If someone can try testing this, it should be RTBC.

#14

thanks for doing that, michaelfavia

#15

Status:needs review» reviewed & tested by the community

It works fine.

I tried it with Mysql and SQLite.

#16

Status:reviewed & tested by the community» fixed

Committed to CVS HEAD. Thanks.

#17

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.