-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Install multisite on fresh D8 fail if DRUPAL/sites/sites.php does't exist #1686
Comments
We already create a sites.php in drush_core_pre_site_install(). Perhaps you can debug and see why it is not working for you. |
Indeed, but sites.php is created later. function drush_core_pre_site_install($profile = NULL) {
$sql = drush_sql_get_class(); These commands work: drush --root=/var/www/drupal-8.x --uri=d8.domain.tld -y si --db-url=mysql://root:pass@localhost:port/dbname
# with empty sites/sites.php and sites/d8.domain.tld/settings.php with correct MySQL driver
drush --root=/var/www/drupal-8.x --uri=d8.domain.tld -y si If I remove sites/sites.php and run # with sites/d8.domain.tld/settings.php with correct MySQL driver
drush --root=/var/www/drupal-8.x --uri=d8.domain.tld -y si I got exception in first post. Digging... |
I found that:
The problem is not in Drush itself... |
I just move $sitesfile and add a touch(), and it works. function drush_core_pre_site_install($profile = NULL) {
$sitesfile = "sites/sites.php";
touch($sitesfile);
$sql = drush_sql_get_class(); |
We dont want unconditionally create a sitesfile like that. By copying settings.php, you did half of a manual install of your site. The ogther half is sites.php. You need to do none or both. sites.php is a new requirement for Drupal 8 when using Drupal's multisite feature. |
I'm getting the exact the same behaviour as OP |
--debug does say what site_path is in use, as does |
Yes it does as:
But when such a message arises, it's pretty hard to understand why it chose "default" rather than "sites/blahfoobar".
Having |
PRs welcome on this.. |
Hello,
I try to install D8 from drush on Debian server, it fails with "Unable to find a matching SQL Class". However, it's not the real issue.
Drush 8 installation:
OK
Drupal 8 installation:
OK
Install website
I create folder "DRUPAL/sites/d8.domain.tld" with a working settings.php (got it from previous D8 install with interface)
Now, i try to install a multisite website:
ERROR
FIX
Create an empty files "sites.php" in "DRUPAL/sites/"
Now it works !
Nothing about SQL...
I know Drupal 8 creates this file when using web interface install (with comments inside).
Can Drush creates this file on site install...?
The text was updated successfully, but these errors were encountered: