I’m pretty new to Drupal and I’m trying to update a website from 8.0.0 to 8.6.1.
I’ve followed the guide here: https://www.drupal.org/docs/8/update/update-core-via-composer
The composer part went pretty well. However, when I run the command:
drush updatedb
I get the following error:
Command updatedb needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command. The drush command 'updatedb' could not be executed.
I’ve read online that I had to use cc all
first, but when I do:
drush cc all
I get the following:
No Drupal site found, only 'drush' cache was cleared.
I thought that I might have to update my Drush version since I was running on 8.1.17 because version 9.x was not supporting Drupal 8.0.0. Therefore, I updated to 9.4.0.
Now when I execute the updatedb command, I get the following:
Bootstrap failed. Run your command with -vvv for more information.
And the stacktrace:
Exception trace: DrushBootBootstrapHook->initialize() at /root/.composer/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:34 ConsolidationAnnotatedCommandHooksDispatchersInitializeHookDispatcher->callInitializeHook() at /root/.composer/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:27 ConsolidationAnnotatedCommandHooksDispatchersInitializeHookDispatcher->initialize() at /root/.composer/vendor/consolidation/annotated-command/src/CommandProcessor.php:117 ConsolidationAnnotatedCommandCommandProcessor->initializeHook() at /root/.composer/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:391 ConsolidationAnnotatedCommandAnnotatedCommand->initialize() at /root/.composer/vendor/symfony/console/Command/Command.php:217 SymfonyComponentConsoleCommandCommand->run() at /root/.composer/vendor/symfony/console/Application.php:964 SymfonyComponentConsoleApplication->doRunCommand() at /root/.composer/vendor/symfony/console/Application.php:248 SymfonyComponentConsoleApplication->doRun() at /root/.composer/vendor/symfony/console/Application.php:148 SymfonyComponentConsoleApplication->run() at /root/.composer/vendor/drush/drush/src/Runtime/Runtime.php:112 DrushRuntimeRuntime->doRun() at /root/.composer/vendor/drush/drush/src/Runtime/Runtime.php:41 DrushRuntimeRuntime->run() at /root/.composer/vendor/drush/drush/drush.php:66 require() at /root/.composer/vendor/drush/drush/drush:4
And if I open my drupal website, I’m getting a fatal error:
Fatal error: Class ‘DrupalComponentUtilityString’ not found in /home/username/public_html/themes/name/name.theme on line 548
I’m executing all commands from the root of my drupal website. I’ve also tried to execute it from sites/default/
.
Update
I’ve restored to the version before the update, then performed the following steps in order:
- Updated composer.json to
"drupal/core": "8.6.1"
- Executed the command:
composer update drupal/core --with-dependencies
- Changed directory into the
core/
folder - Executed the command:
composer install
in the subdirectory - Opened domain.com/update.php.
If I don’t perform step 3 & 4, I get an error when trying to load my website saying that it cannot load the file core/vendor/autoload.php
.
Then I’m still getting the same fatal error as mentioned above.
composer.json
This is the original composer.json before the update.
{ "name": "drupal/drupal", "description": "Drupal is an open source content management platform powering millions of websites and applications.", "type": "project", "license": "GPL-2.0+", "require": { "composer/installers": "^1.0.20", "drupal/core": "8.0.0-beta6" }, "minimum-stability": "dev", "prefer-stable": true, "repositories": [], "config": { "preferred-install": "dist", "autoloader-suffix": "Drupal8" }, "extra": { "_readme": [ "This is an example file to show how a Drupal website can be managed via", "Composer. It does not work out of the box but requires a Git subtree", "split of the core directory to be added to the repositories", "section above." ] } }
Sponsored by SupremePR