Closed (fixed)
Project:
Drush
Component:
Core Commands
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
29 Nov 2010 at 05:38 UTC
Updated:
3 Jan 2014 at 02:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
moshe weitzman commentedCommitted. Thanks.
Comment #2
David_Rothstein commented@das-peter found that this doesn't work in all cases. If you have more than one database driver on your system and try to install with the non-MySQL one (in particular with SQLite), the wrong form validation runs and the Drush install fails.
This seems to be a core issue, though: #992928: Command line (Drush) install fails on SQLite ($form_state['input'] is not always populated for programmatic form submissions)
Comment #3
greg.1.anderson commentedI just encountered the same situation with drush site-install for d6: the install fails if you have both mysql and postgres, because the install script cannot handle the database selection form (the one that is skipped when there is only one driver).
Is this really a core issue, or a drush issue? I'm not sure, as the d6 and d7 site-install functions are unrelated.
Comment #4
Garrett Albright commentedI looked into this tonight. I'm pretty sure it's a core issue, since Drush seems to be handling its part of the process just fine - it's only after it passes stuff off into core's functions that they start to go all sideways. See the issue David_Rothstein linked to.
Comment #5
Garrett Albright commentedReopening because I've determined that this is in fact a Drush bug, in drush/commands/core/drupal/site_install_7.inc - $settings isn't being set to something Drupal expects. A social event is preventing me from working on this further at the moment (darned real life!), but I'll see if I can hack out a fix later tonight, if I'm up for it.
Comment #6
moshe weitzman commentedI can reproduce this on my windows install but not my OSX. That probably an artifact of how they are configured rather than OS making a difference.
The error is being set at
if (isset($elements['#needs_validation']) && $elements['#required']) {in _form_validate() and it is the name of the pgsql database that is being checked. Note that i am installing to mysql so naturally pgsql values are empty. Is this validation not supposed run? If not, then maybe #needs_validate should be FALSE for this pgsql-database element. #needs_validation is TRUE.Comment #7
moshe weitzman commentedWas a drush issue. Namely, I was not setting
'op' => dt('Save and continue'),on each of the forms so the button that carries the #limit_validation_errors was not in form_state[#input] (David noted this symptom in #2).I don't know why this started failing now though.
Comment #8
David_Rothstein commentedTurns out there is still both a Drush bug and a core bug. More details are at #992928: Command line (Drush) install fails on SQLite ($form_state['input'] is not always populated for programmatic form submissions).
Here is the Drush fix. The important part is the first line - removing the 'op' stuff isn't strictly necessary (and whether it should be removed depends also on the exact final version that gets committed as part of the core patch, but I think it will be OK to remove in the end).
The main problem here in Drush is just that with the originally committed patch in this issue we were never actually selecting the driver itself anymore. Oops :( I am not sure how I missed that before.
Comment #9
moshe weitzman commentedCommitted. Decided eventually to leave the op lines in place. Will remove if core no longer requires them.
Comment #10
moshe weitzman commentedRemoved the $op since that patch landed in core.
Comment #11
David_Rothstein commentedPretty sure the $op still needs to be there actually. Since that part of the patch was removed before it was committed to core...
Comment #12
moshe weitzman commentedCurrent code is working for me.
Comment #13
webchickHm. Not working here on a new installation (freshly cvs up -dPCA from moments ago).
However, "drush si" from an existing installation works fine.
Comment #14
moshe weitzman commentedOK, rolled back my removal. David warned me in #11.
About to release Drush RC5.
Comment #15
webchickWorking now. :) Thanks!
Comment #16
David_Rothstein commentedStrange that it stopped working with mysql too... that I wouldn't have expected. It always worked with mysql before because that is compatible with the default validation.
I tried Drush RC5 with sqlite also and am able to get that working as well. Thanks!