How to reproduce, on a Drupal clean install
- install Drupal 7 minimal profile
- download latest Domain Access 3.x-dev (drush dl domain-3.x-dev)
- enable Domain Access (drush en domain)
- copy include in settings.php (echo "include_once DRUPAL_ROOT . '/sites/all/modules/domain/settings.inc';" >> sites/default/settings.php)
- next query on Drupal site will loop on a 302 redirect
Regards,
David
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 1283834-install-drush-rwquirements.patch | 6.01 KB | agentrickard |
| #11 | domain_drush_install-1283834-10.patch | 2.9 KB | David Stosik |
| #9 | domain_drush_install-1283834-9.patch | 2.87 KB | David Stosik |
Comments
Comment #1
agentrickardNot replicable. How is your DNS set up?
Comment #2
agentrickardO, this is documented -- on
drush enyou must specify a URL parameter.See http://drupal.org/node/1096956
This is because drush doesn't pass a proper HTTP_HOST for module setup.
Comment #3
David Stosik commentedYou mean enabling the module via the interface, or any HTTP-called code (install profile for example), there won't be any problem ? I'll test that right now.
Comment #4
David Stosik commentedRight, this works. Thanks for the help. :)
Comment #5
agentrickardNot sure that there is a better solution to this, btw. It's something that only happens with drush, and so the documentation is the only workaround.
There should, however, be some error checking to ensure that we don't try to redirect users to the default domain if it isn't set correctly.
Perhaps exit the routine if {domain} is empty?
Comment #6
David Stosik commentedFail the install if cannot find any domain, and throw a message intended to drush users, asking them to use --uri argument ?
Comment #7
agentrickardYup. We can do that.
Do you know what, if anything, was stored in the {domain} table when your install failed?
Comment #8
David Stosik commentedNo line in the {domain} table. :)
Comment #9
David Stosik commentedHow about this ?
Using hook_requirements, phase=install, to test if $_SERVER['HTTP_HOST'] is set.
Messages needs to be refined.
Comment #10
agentrickardYeah, I like that!
Comment #11
David Stosik commentedBetter error message : re-use domain_valid_domain() error, and add appropriate advice for drush users.
Comment #12
agentrickardReviewed and refactored a bit. If we really want to run domain_valid_domain here, then get_t() is required.
The question is, should we enforce that behavior or merely ensure that $_SERVER['HTTP_HOST'] is set properly?
drush sets that value to 'default' if --uri is not specified.
Comment #13
agentrickardBetter title.
Comment #14
agentrickardWell, this doesn't break anything, and is itself untestable.
And since no one cares, I'm going to roll it into rc2 and see who cries.