Trying to install Drupal 7 on Mac OS X, I am given only the option of a SQLite database, and not MySQL. In terms of usability this is confusing, as I just presumed that the fields I was being given were for MySQL connection information, and only realised that assumption was incorrect when I got SQLite errors:

Failed to create a test table on your SQLite database server with the command CREATE TABLE drupal_install_test (id int NULL). SQLite reports the following message: SQLSTATE[HY000] [14] unable to open database file.

PDO::getAvailableDrivers() is returning only sqlite as being available.

I had thought this was a localised problem because of the way my environment is set up, but it seems from this support thread and blog post that it is a wider problem with the standard installation of PDO on Mac OS X 5 (Leopard), so others are likely to run into it too.

At a minimum we should highlight the database type that is being used (the only mention is in the help text at the moment), even if there is only one available, but beyond that, perhaps find a workaround that could be coded in (MySQL still works, just not through PDO) or provide documentation that would help developers fix the issue on their system.

Files: 
CommentFileSizeAuthor
#18 drupal-install-one-dbtype.png45.78 KBDave Reid
#17 355496-install-one-db-type-D7.patch2.78 KBDave Reid
Passed: 9621 passes, 0 fails, 0 exceptions
[ View ]
#1 355496_singular_databases.patch2.13 KBgeodaniel
Unable to apply patch 355496_singular_databases.patch
[ View ]

Comments

Status:Active» Needs work
StatusFileSize
new2.13 KB
Unable to apply patch 355496_singular_databases.patch
[ View ]

Attached is a patch which (as a first step) re-introduces the list of database types, even if only one is available. This way, the user installing the site can see at a glance what database type is being used.

Status:Needs work» Needs review

Haven't tried the patch yet, but on visual inspection looks OK. I agree that making it clear what database is in use is a good thing, independent of any other Mac considerations. I don't know what we can do about buggy Mac drivers other than recommend that people fix PDO on the Mac.

Makes complete sense to me. Could you provide a screenshot with and without?

Er, there's not much to the screen shot. Before, there will sometimes be a 2-or-more-value radio button, and sometimes no radio button. With the patch, there will always be a radio button even if it only has one value.

Hi Crell, yeah I know. But I'm trying to get screenshots for any usability related patches so that patch averse people from the usability group can look them over easily.

I would support the patch and a docs page explaining the issue. The PDO-layer is what made me switch to MAMP instead of vanilla OSX, fyi.

Category:task» bug

Changing the title to reflect the patch in #1, and I've added a short handbook page at http://drupal.org/node/369107 which at least points people to some other resources. I tried the switch from 64-bit to 32-bit but still have had no success. I think it's about time to switch to MAMP, but it seems a shame to have to force people to do that.

Title:MySQL not available as a PDO driver on install on Mac OS XList all available databases, even if only one is available
Category:bug» task

Category:bug» task

Huh what? There was already text saying t('The name of the %driver database your @drupal data will be stored in. It must exist on your server before @drupal can be installed.') so what do you want with a single radio ...???

I think it just helps from a usability standpoint to highlight which database type is being used. Who really reads the help text under the fields? ;)

What geodaniel said. :-) If you have only one DB available, right now it doesn't indicate to you which one you're using. That's ungood.

Make the help more visible but do not make a form with one radio button that's very confusing "I am supposed to choose something. But what? There is only one option. Why? What did I do wrong there are no more"

Component:database system» install system
Issue tags:+Usability, +DrupalWTF

Status:Needs review» Needs work

Yeah let's not add a single disabled radio button to this form, but showing which driver will be used is a good change.

for your consideration: how do we do it with input types?

My first thought is that if there's only one, you get a one-item UL instead of radio buttons and a value form element instead of the radio to carry the value. Arguably you wouldn't even want the bullet there, so just a div with the database name in it.

Status:Needs work» Needs review
StatusFileSize
new2.78 KB
Passed: 9621 passes, 0 fails, 0 exceptions
[ View ]
new2.78 KB
Passed: 9621 passes, 0 fails, 0 exceptions
[ View ]

I wanted to try what a grey-ed out single radio button would look like, and I don't think it's all that bad. I added unset($drivers['pgsql']); unset($drivers['sqlite']); to install_settings_form() to simulate this condition and the installer worked correctly since disabled fields still return a value in $form_state['values']. Screenshot attached for review.

Issue tags:+Needs usability review
StatusFileSize
new45.78 KB

Screenshot attached this time.

Hm. I'd actually be OK with that visually, especially since the help text says why it's grayed out.

I like the idea of it being greyed out but also adding to the help text beneath it.

+1 for #17/#18

Status:Needs review» Reviewed & tested by the community

I think we have an agreement.

This looks like a considerable improvement over the current state of things, so +1 from me.

Status:Reviewed & tested by the community» Fixed

Thanks all. :) Committed to HEAD.

Thanks everyone

Status:Fixed» Closed (fixed)
Issue tags:-Needs usability review, -Usability, -DrupalWTF

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