Actually, I try to update Drupal V 8.8.9 to v 9.4.8, so that first I update to Drupal 8 latest version i.e., 8.9 and its updated successfully after I update Drupal 9.4 via composer and its showing update but when I run command drush cr & drush updb I got following error.this is an proof that drupal upadte to 9.4.8 & when i run drush updb this error come & & when i run drush cr this error shown i don't know why this happen..!
I try update Drupal 8 to 9 and it's update but when i run drush updb & cr its does not work so i need help in find out what is the problem
Related
I would to export result from a command run by drush but it doesn't work.
This command create an empty file:
drush #sited8bl.preprod ms > ~/www/XXX/exports-bruts/$(date +%Y%m%d_%H%M%S)-migrationsBL.txt --debug
This debug message let think the command isn't found:
[debug] Done with bootstrap max in Application::find(): trying to find ms again. [4.39 sec, 31.8 MB]
On another server (multisite) it works, the hosting say there is a drush issue.
If someone can help me on this
Thanks
I am trying to execute drush commands through a crontab for a Drupal 8 site. These commands work when I call them directly, but when run through my user's crontab I get the following error:
\Drupal::$container is not initialized yet. \Drupal::setContainer() must be
called with a real container.
Other posts suggest this is a bug within older versions of Drush, but I am on 10.3.5.
I have tried a number of things over the past few hours including reconfiguring cron, but ultimately it seems Drush is not bootstrapping Drupal correctly, but I need to be able to run the queue from cron
This is a test command I'm running which just adds to the Drupal log...
crontab (my user)
* * * * * /var/www/html/vendor/bin/drush scr /var/www/html/scripts/what.php -r /var/www/html/web
what.php
<?php
\Drupal::logger('mymod')->info("CHECKING IN FROM CRON CLI...");
Here is another command, closer to what I'm trying to accomplish...
crontab (my user)
* * * * * /var/www/html/vendor/bin/drush queue:run commerce_recurring -r /var/www/html/web >> /var/www/html/private/logs/cron_commerce_recurring.log
The error I get here is:
Command queue:run was not found. Drush was unable to query the database. As
a result, many commands are unavailable. Re-run your command with --debug
to see relevant log messages.
I get this same error when running this command with drupal console.
Any suggestions appreciated.
Thanks.
This turned out to be a database connectivity issue. The tricky part was getting to the error. I had to install an MTA, so that cron could write errors to my local user's mailbox and then add the --debug option, so that I could see the real error.
I'm working on a DDEV instance and for some reason the DDEV settings were not being loaded. An issue for another day...
I was trying to export a drupal site to local, and while doing "drush cr" iam receiving the following error 'You have requested a non-existent service "database.replica_kill_switch"', How to fix this?
I found this error in an installation previous to 8.7.x, while updating to 8.8.x. this "database.replica_kill_switch" doesn't exist before 8.7.x. Maybe you have some module only compatible with 8.7.x and greater.
I solved my error, not sure if it applies to your case, with the following commands:
composer update
drush updatedb
# ignore if drush cr fails
drush cr
# make sure your composer.json requires twig/twig:^1.38.2
vi composer.json
composer update twig/twig
composer require drupal/core:8.7 --update-with-dependencies
drush updatedb
drush cr
This is similar to an unanswered question from a year ago. Supposedly I have an update for drupal/core:
$ composer outdated "drupal/*"
drupal/core 8.6.10 8.6.12 Drupal is an open source content ...
But when I run update ...
$ composer update drupal/core --with-dependencies
Dependency "asm89/stack-cors" is also a root requirement, but is not explicitly whitelisted. Ignoring.
Dependency "composer/semver" is also a root requirement, but is not explicitly whitelisted. Ignoring.
[ ... ]
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
> Drupal\Core\Composer\Composer::preAutoloadDump
> Drupal\Core\Composer\Composer::ensureHtaccess
I'm trying to follow the instructions to update drupal 8 via composer found here: https://www.drupal.org/docs/8/update/update-core-via-composer
I had the same issue today with updating Drupal and the following process helped me solve the issue.
Run the composer update command using the specific version you are trying to update to. In this instance it would be composer require drupal/core:8.6.12 --update-with-dependencies If there is an issue blocking the update this should show you a list of problems. in my case I tried to update to version 8.6.11 and it output the following.
Problem 1
. Installation request for drupal/core 8.6.11 -> satisfiable by
drupal/core[8.6.11].
. Can only install one of: twig/twig[1.x-dev, v1.35.3].
. Can only install one of: twig/twig[v1.35.3, 1.x-dev].
. Can only install one of: twig/twig[1.x-dev, v1.35.3].
. drupal/core 8.6.11 requires twig/twig ^1.38.2 -> satisfiable by
twig/twig[1.x-dev, v1.38.2].
. Conclusion: don't install twig/twig v1.38.2
. Installation request for twig/twig (locked at v1.35.3, required as
^1.35.0) -> satisfiable by twig/twig[v1.35.3].
If there is no problem listed try clearing the composer cache composer clearcache and then try the update command again.
you can also try running the why-not composer command to see if that highlights any issues composer why-not drupal/core:8.6.12
In my case the issue was that the twig component required for 8.6.12 was v1.38.2 but was capped at a lower version 1.35 in the composer file. I used the following command to update the twig version and that allowed me to update to Drupal 8.6.12 using my normal update process.
composer require twig/twig:1.35.2
I hope this helps.
I am getting [error] could not find driver for the command drush cache-rebuild
Below is the Drush and Drupal Version Details, Appreciate any help. Thanks
I was using wampp with PostgreSQL where I enabled pdo_pgsql, pgsql from wampp applcation menu (wampp> php > php extension). It didn't work for me.
Step 1) run php -m in terminal, in my case it didn't listed those php modules although it was showing enabled in wampp. So I went to php.ini and enabled those modules.
Step 2) drush cr or drush cache-rebuild clears cache from database, so make sure to put postgres path to system environment variable.
Try this:
sudo composer update
run drush cr all
Try using drush cr command. And if you are using ubuntu then you must use sudo drush cr command.