New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multisite Uri Option Not Working? #2002
Comments
|
I have the same problem too. However, I don't have a multisite. But, even if there is only one site, I don't use "default" directory for my project. The problem is in DrupalConsole/src/Helper/DrupalHelper.php. /**
* @return bool
*/
public function isConnectionInfo()
{
$settingsPath = sprintf('%s/%s', $this->root, self::DEFAULT_SETTINGS_PHP);
if (!file_exists($settingsPath)) {
return false;
}
if (Database::getConnectionInfo()) {
return true;
}
return false;
}Instead of looking in the "default" directory, it would check first if there is settings.php in current directory. |
|
@58bits Thanks a lot for filing this issue! We'll take a look at it as soon as possible! |
|
I have the same symptoms when using |
|
@jmolivas this is the issue I talked to you about at DrupalCon. |
|
I did a little testing, based on the comment by @Anicky above. I confirmed that the I am specifically testing with the As a separate question: I wonder if the |
|
We encountered the same issue. Any news here? |
|
I have also encountered this issue so, I'll just drop this here: at the moment I have work around this using a script that symlinks |
|
The workaround mentioned by @esolitos works for a normal Drupal multi-site installation. It does not work for multisites installed via Aegir, however. This is because Aegir takes an extra security precaution and does not store the database credentials in settings.php. See #2263 My workaround for that has been to create a simple settings.php file in the default folder with the actual database credentials hard-coded. This allows Console to find the database... but obviously it only works for one site in the multi-site platform. |
|
The adequate settings.php file seems to be found and read during the drupal kernel booting. Why the |
- PB: it looks like the uri parameter is not taken in account anymore and the multisite doesn't work - FIX: read the uri option and generate a symfony request accordingly before initializing the drupal container
|
@mickaelperrin Since #2850 was merged, does that mean that this issue is fixed? |
|
One issue I found about the the I would expect it to return This is because That is done in The issue affects also the drupal For some details about why setting the base path correctly is important, look at a similar bug report for Drush: drush-ops/drush#3463 Should I file a separate issue for this base path problem? |
58bits commentedMar 8, 2016
Great tool, however I'm not sure that -l, or -uri options are working for multisite.
I have a sites directory with 'default' and 'my.site.com'. There is no active settings.php file in 'default'.
I have a sites.php file containing an alias to the 'my.site.com'
However when I try
drupal list --uri=http://my.site.com- from the Drupal root, I receive a message saying that "[WARNING] In order to list all of the available commands you should install drupal first."If I take a copy of the settings.php file from my.site.com, and temporarily place it in the 'default' site directory - drupal console works as expected.
The text was updated successfully, but these errors were encountered: