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
[chain] - [multisite:new] [site:install] - Executing chain fails #3197
Comments
Hello there! I met @enzolutions in the sprint room at Drupalcamp Iceland, and asked if there was somehow I could help to get started contributing to DrupalConsole. He pointed me to this ticket. I'm saying this to warn you I'm a newbie to contributing here ... I have cloned drupal-console to ~/workspace/drupal-console and the drupal site I am running it from is ~/workspace/drupal.template. When I run the command with the supplied chain file, I get the following output.
|
I'm not sure why I'm getting:
After all I can see the multisite:new command in the Repo. (It was added with this PR https://github.com/hechoendrupal/drupal-console/pull/2335/files) EDIT - it's not properly in the repo any more. A search for "multisite:new" brings up 2 results under translations, and only 1 result in the code itself at src/Command/Multisite/NewCommand.php:58 |
@michaellenahan Do you have a Drupal codebase you're running this against?
What happens when you run |
Could it be that there is something missing in the service discovery? If we look here: https://github.com/hechoendrupal/drupal-console/tree/master/config/services/drupal-console we can not find any multisite.yml --- maybe that is why I am getting the error "command does not exist" ? I've done a bit of investigation in the git repo. multisite.yml was deleted here: ... and here: services-drupal-install.yml was renamed ... services-drupal-install.yml → uninstall.services.yml Right now there is a reference to "console.multisite_new" in uninstall.services.yml:23 ... still don't know why it's not getting loaded though. |
Hi, @brandonratz "Do you have a Drupal codebase you're running this against?" Yes, I have done the "composer create-project drupal-composer/drupal-project" thing and named the directory "drupal.template" "What happens when you run ~/workspace/drupal-console/bin/drupal list"
|
Ahh yes, this because you're not running the command against an initialized Drupal codebase. Sorry some of this is out of my realm of experience but I'll do my best to explain. Drupal console needs to run as a dependency in your Drupal project. Installation docs are here: https://github.com/hechoendrupal/drupal-console The project scaffold should look something like this:
If you run
If there is a database defined for default with a Drupal site installed, you'll get a myriad of other command options. |
Thank you @brandonratz - it was exactly as you said - there was something wrong with my drupal installation - I re-downloaded https://github.com/drupal-composer/drupal-project and was able to see multisite:new in my list. I was thus able to reproduce the problem you reported in your original post. The problem is in src/Utils/Site.php:200
Specifically: The reason for this is that So where was this key incorrectly set? The problem is with the previous command 'multisite:new'. src/Command/Multisite/NewCommand.php:162
This is incorrect because this adds the text:
... to sites.php. The correct text in sites.php should be:
So the fix is to change
|
Pull request is here: #3232 |
Fixed with PR #3232 |
Version: Drupal Console (1.0.0-rc16)
Problem
Using command: 'multisite:new' followed by 'site:install' via chain command fails.
Expected behavior
Actual Behavior
Console Output
Chain file example
The text was updated successfully, but these errors were encountered: