-
-
Notifications
You must be signed in to change notification settings - Fork 559
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
site:install PHP Fatal error: Uncaught Error: Class 'Drupal\Core\Language\LanguageManager' not found in .composer/vendor/drupal/console/src/Helper/DrupalHelper.php:179 #2589
Comments
@therobyouknow try installing DrupalConsole per/site, from site root executing
Docs must be updated. |
Sorry @jmolivas this did not work for me.
Also, before I ran your suggested command, I looked in composer.json and saw that it already had Thank you for your help so far, but can you advise on the above? |
Looks like I solved it. Solution to follow very shortly. |
Here's how I got further, my solution so far When in /var/www/d8.dev, I ran
This updated the composer.json file with a later version of console (the latest stable) Then I remembered from using drush that such tools are stored in the vendor folder, so I did:
But got errors about gd and curl being missing:
So I installed php7 versions of these as my puphpet.com vagrant provisioned VM is Ubuntu 14.04 64bit LTS with PHP 7:
In my docroot, /var/www/d8.dev I then did:
(based on my recall mentioned earlier that drush had to be run like this) Then I got the error:
So I ran Drupal init:
from my docroot and this worked out fine:
So my next step would be to run the drupal site:install to install Drupal instead of using drush |
drupal site:install worked fine as described here: #2592 (comment) I'll also add that I needed to adjust my puphpet.com generated config.yaml so that Apache is pointed to /web in the docroot:
Note that it's only the docroot path that needs web added, nothing else. Make sure you do a This adjustment is to the config.yaml file from my puphpet.com generated manifest .zip file that I generated from puphpet.com today. Main settings I chose were:
I really hope all this helps others. I've been through frustrating times trying to "do the right thing" with setting up Drupal 8 (i.e. using all the state of the art PHP tools like Composer and Console that the in-crowd cognoscenti use for their development) and not the cop out of just downloading the zip and using drush. Triumph!!! |
Followed steps in: https://www.drupal.org/node/2471553 to set up a Drupal 8 up via Composer commands, to set up my site, with doc root: /var/www/d8.dev
But wanted to try using Drupal Console install command instead of drush (specified in the steps) to do the actual site install as the last step.
So I downloaded Console using:
composer global require drupal/console:@stable
as per the Drupal Console doc: https://hechoendrupal.gitbooks.io/drupal-console/content/en/getting/composer.html
(when in my /home/vagrant/ folder)
Then I went to /var/www/d8.dev to run the site install command
drupal site:install minimal --db-name="d8" --db-user="d8" --db-pass="d8" --site-name="D8 Example" --site-mail="email@example.com" --account-name="d8" --account-mail="email@example.com" --account-pass="d8"
When I ran this I got:
PHP Fatal error: Uncaught Error: Class 'Drupal\Core\Language\LanguageManager' not found in /home/vagrant/.composer/vendor/drupal/console/src/Helper/DrupalHelper.php:179
Stack trace:
#0 /home/vagrant/.composer/vendor/drupal/console/src/Command/Site/InstallCommand.php(343): Drupal\Console\Helper\DrupalHelper->getStandardLanguages()
#1 /home/vagrant/.composer/vendor/drupal/console/src/Command/Site/InstallCommand.php(140): Drupal\Console\Command\Site\InstallCommand->getLanguages()
#2 /home/vagrant/.composer/vendor/symfony/console/Command/Command.php(244): Drupal\Console\Command\Site\InstallCommand->interact(Object(Symfony\Component\Console\Input\ArgvInput), Object(Drupal\Console\Style\DrupalStyle))
#3 /home/vagrant/.composer/vendor/symfony/console/Application.php(863): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Drupal\Console\Style\DrupalStyle))
#4 /home/vagrant/.composer/vendor/symfony/console/Application.php(192): Symfony\Component\Console\Application->doRunCommand(O in /home/vagrant/.composer/vendor/drupal/console/src/Helper/DrupalHelper.php on line 179
Fatal error: Uncaught Error: Class 'Drupal\Core\Language\LanguageManager' not found in /home/vagrant/.composer/vendor/drupal/console/src/Helper/DrupalHelper.php:179
Stack trace:
#0 /home/vagrant/.composer/vendor/drupal/console/src/Command/Site/InstallCommand.php(343): Drupal\Console\Helper\DrupalHelper->getStandardLanguages()
#1 /home/vagrant/.composer/vendor/drupal/console/src/Command/Site/InstallCommand.php(140): Drupal\Console\Command\Site\InstallCommand->getLanguages()
#2 /home/vagrant/.composer/vendor/symfony/console/Command/Command.php(244): Drupal\Console\Command\Site\InstallCommand->interact(Object(Symfony\Component\Console\Input\ArgvInput), Object(Drupal\Console\Style\DrupalStyle))
#3 /home/vagrant/.composer/vendor/symfony/console/Application.php(863): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Drupal\Console\Style\DrupalStyle))
#4 /home/vagrant/.composer/vendor/symfony/console/Application.php(192): Symfony\Component\Console\Application->doRunCommand(O in /home/vagrant/.composer/vendor/drupal/console/src/Helper/DrupalHelper.php on line 179
Can you advise, please?
The text was updated successfully, but these errors were encountered: