Questions tagged [drush]
Use it for questions about the command line shell and Unix scripting interface for Drupal (a.k.a. Drush).
416
questions with no upvoted or accepted answers
0
votes
0
answers
28
views
File migration issues
Well - where to start?
I'm trying to migrate a medium-sized Drupal 7 site to Drupal 10. I am just going to concentrate on the migrations of files.
I'm confused by a few things. One is that I am by ...
0
votes
0
answers
63
views
Contrib module remove
I want to remove the content_sync module from my site. Firstly I uninstalled it with drush pm-uninstall, run a drush cex, drush cr and then removed it using composer remove. I removed also every ...
0
votes
0
answers
102
views
There were errors validating the config synchronization after changes to modules and config
After many hurdles, struggles, and "learning moments", I pushed my site to staging successfully. Unfortunately, I am running into numerous issues when I try to push updates to a deployed ...
0
votes
0
answers
58
views
drush uses development.services.yml though not present in settings.php
I am currently observing that drush seems to use development.services.yml from web/sites though development.services.yml is not added via settings.php.
Doing
drush php:eval "var_export(\Drupal::...
0
votes
0
answers
140
views
How to run drush cim command for importing all the configurations
I cloned the drupal project on my local.
I have a Docker desktop app.
so I run docker-compose up -d on command prompt.
docker-compose.yml:
services:
mariadb:
image: wodby/mariadb:$MARIADB_TAG
...
0
votes
0
answers
184
views
How can you update a single configuration entity using drush?
Every now and then, if I try to import partial configs using drush, like
drush config:import --partial --source=stuff/is/here
drush seems to understand that some of these config entities exist in the ...
0
votes
0
answers
44
views
Config split is imported only every second time of jenkins job run
I have some weird behavior with drush cim when running from a jenkins job.
It seems like a config split is only imported every second time or so when the job is run.
The update skript containing the ...
0
votes
0
answers
248
views
I'm unable to run Drush v8.4.12 on PHP 8.1.6 using Bash on Windows11
I'm on the final two sites to migrate to D9 - but some D9 modules are now needing PHP 8.1 to stay on the latest upgrades. So - I've changed my server environment to use PHP 8.1 - and using XAMPP for ...
0
votes
1
answer
141
views
Without site aliases, "drush sql:sync" fails
I run into an issue that the use of an alias returns correct values, but without alias or from remote, I miss the DB connection. Furthermore, the root directory is wrong.
The missing DB connection ...
0
votes
0
answers
280
views
Import config on Drush install with config in non-standard directory
I've got a site set up with its config sync in a directory outside of web root; specifically ../config/sync (relative to the Drupal root). I have that path set for $settings['config_sync_directory'] ...
0
votes
0
answers
120
views
How to version control with Git whilst using composer?
So I've been going through the steep learning curve from D7 to D9.
I like to use git for deployment and version control. I'm new to composer as I only know Drupal and it was never used.
I've developed ...
0
votes
0
answers
248
views
drush cr behavior
Is it normal for the site to become unreachable while running drush cr or this is something need to be fixed?
I have a site running drupal 9 that is becoming unavailable while running drush cr and the ...
0
votes
1
answer
370
views
drush not finding correct multisite settings.php
I have a Drupal 9 site using multisite to support both local and production hosts. I have defined them in sites/sites.php:
$sites['www.electronovelty.com'] = 'www.electronovelty.com';
$sites['www.en9-...
0
votes
0
answers
507
views
How to specify setting.php file for drush?
I'm using Drupal 9 and Drush 11. I have two hosts, one for local testing (www.en9-local.pglatz.com) and a remote production server (www.electronovelty.com).
When I run drush status from either of ...
0
votes
0
answers
43
views
Untangle Composer Drush and non-Composer Drush
I have Drush 10.3.2-dev working on my system but I also need to work on an old project in Drupal 7, so I need Drush 7 to work on that particular project.
I downloaded Drush 7, unpacked it in a folder, ...
0
votes
1
answer
966
views
How to stop cron process without rebooting my server?
I have tried the following:
drush php-eval "\Drupal::lock()->release('cron');"
This had no effect. I'm still seeing "Attempting to re-run cron" errors pile up in the log.
I ...
0
votes
0
answers
141
views
System updates, now config page errors, drush ends abnormally
After an update failed I'm seeing the following issues. I have tried several things to recover. I do have a database backup, but I am not sure on how to restore using Drush (and I'm concerned because ...
0
votes
0
answers
353
views
How to prevent drush migrate:import from updating existing content?
Drush migrate:import (version 10.3.6) seems to be updating existing content regardless if the --update option is used or not. What could be the problem?
I've tested it both with and without the --...
0
votes
0
answers
474
views
Adding custom field generated by drush to available fields on node
I have an existing custom module on my D9 website and I need to make some changes inside it. I want to add a field (boolean) into any content type page edit without doing it manually.
So I need my ...
0
votes
0
answers
312
views
ddev Too many arguments, expected arguments "command" "key"
I'm trying to run
ddev exec drush state:set system.maintenance_mode 1
With MAMP drush state:set system.maintenance_mode 1 works fine.
With ddev I get the error:
Too many arguments, expected ...
0
votes
1
answer
125
views
Calling setExposedInput() from a Drush command doesn't have any effect
We have a custom Drush command implemented using the following code.
class JobApplicationExportCommands extends DrushCommands {
/**
* Exports Dorea Job Applications since the last run to csv
*...
0
votes
1
answer
41
views
Custom Migration Plugin MySQL Error
I've run into the following error when running the command drush migrate-import custom_spotlight
where custom_spotlight is the name of the plugin. I've been following along with this guide: https://...
0
votes
0
answers
107
views
Using Drush 10 and sql-sync with path based sites not working
We have two websites running off a single domain:
https://www.mywebsite.com
https://www.mywebsite.com/mywebsitetools
Both websites have their own databases and are hosted by Acquia.
We've been using ...
0
votes
1
answer
427
views
Drush 10 is not working - seems unable to properly find the site
Greetings to all of you.
Drush seems unable to properly find the site.
The output of vendor/drush/drush/drush status
PHP binary : /usr/bin/php
PHP ...
0
votes
0
answers
808
views
$container not initialized after installation from sources (code and database)
I'm working on a site installed with Composer. After the local installation broke, I'm trying to reinstall the project from source code and the MySQL database. All the sources are versioned on Git (...
0
votes
1
answer
282
views
Import configuration in CI/CD script does not work
I have a Drupal 8.9.13.
I wanted to install a new module, for example the google_tag. But in my case I do that in my CI/CD process. So to do that I did the following actions:
edit the composer.json ...
0
votes
0
answers
492
views
Deadlock on Semaphore table results intermittent service denial of the site
Experience deadlock on Semaphore table frequently, which result in service denial of the site.
Site configuration
Drupal version : 8.8.6
Apache version: Apache/2.4.46 PHP 7.2.33
Drush version : 10.3....
0
votes
0
answers
257
views
"drush updatedb" failes with "The provided host name is not valid for this server"
I run my site with Drupal 9.1.6 on Strato Webhosting. The site is well accessible via Webbroser either under mydomain.tld or www.mydomain.tld. I can perform a database update running update.php, but ...
0
votes
0
answers
522
views
Drush Error: environment settings not found or configured for Drush command
I'm working on a legacy project and am trying to see if Drush can be set up properly. I installed the drush executable locally, I'm not sure if that is the issue. But when I go to run a basic command ...
0
votes
0
answers
54
views
It's not allowed to store backups inside the Drupal root directory
I must be missing something because I can't determine what I'm doing wrong. I've got a D7 site, and we're running Drush 8.1.10
I'm trying to run through some updates but I keep running into this error:...
0
votes
0
answers
495
views
Drush failing on preflight: A colon cannot be used in an unquoted mapping value
I can't run drush in my current project. The error I keep getting is:
[preflight] A colon cannot be used in an unquoted mapping value at line 3 (near " in Command line code on line 1").
...
0
votes
0
answers
164
views
Drush script to save multiple nodes of different types
I wrote a function that updates fields of an "Intervention" content type and saves it, then saves the "Request" node that contains it, and then saves the "Dossier" node ...
0
votes
0
answers
132
views
Discover custom services with drush generate
When I create a module and a custom service with drush generate and then create another service, also with drush generate, the first one is not available to inject.
What is missing to make it become ...
0
votes
0
answers
331
views
Unable to run drush via php's `exec` command
I'm creating an admin page for my module that will allow an admin to trigger scripts from within the module configurations.
So far, I've created these routes:
my_module.scripts.home:
path: "/...
0
votes
3
answers
2k
views
Stuck in my config import because of guzzlehttp/guzzle error
I am trying to import the config from another of my Drupal 9.1.4 projects with Composer / Drush (drush config-import from a folder source, all two websites on my local repository on Xampp), but a ...
0
votes
0
answers
165
views
How to migrate PDF files to specific node
I have a directory with PDF files and I have 45 nodes of content type Download. I have to migrate each PDF file to specific node. All PDF file names I read from a CSV. Before these PDF files, I had to ...
0
votes
0
answers
353
views
Using drush config import and update db in a rolling deployment (k8s) environment
Disclaimer: complete Drupal newbie here. I'm the infrastructure guy in the team.
We are running various Drupal 8.9 instances on Kubernetes using a managed MariaDB outside k8s.
We build Docker ...
0
votes
0
answers
373
views
Unbuffered query errors and conflict in access to the database
I've been developing on Drupal at work for some time, now I also have a hosted personal site (on fastcomet). The first install was with 8.6 and php 7.2, then it has been idle for a while, now I ...
0
votes
0
answers
107
views
How can I query a webform in all instances at once to export a file?
We recently had a security breach and those making the decision opted to remove the capability of end users to create the file upload component.
What I am hoping to do is two-fold:
1.) Use drush sql-...
0
votes
0
answers
751
views
"Error: Allowed memory size issue"
I have Drush installed on my Inmotion hosting server.
For one Drupal 7 site, it works just fine but for the other one, which is nearly identical, it doesn't work so well.
Some commands it allows (like ...
0
votes
0
answers
721
views
How to get Drush to be able to query the DB?
I am getting the following error trying to run Drush on Win10, WSL2, and DDev. I can run other Drush commands, but not all of them.
How do I fix it?
Command self-update was not found. Drush was unable ...
0
votes
0
answers
489
views
Issues with Drush 10.3.5 version in Ubuntu 20.04
I installed Drush 10.3.5 version via composer in Drupal 9.0.7 but I am getting a website error as follows after I ran command drush cache-rebuild. I can not access the admin page as well.
The website ...
0
votes
0
answers
777
views
Drush can't bootstrap sites
I have an Ubuntu 18.04 server where I have one Drupal 8 and two Drupal 7 sites. I have installed drush 8.4.5 which works great for the Drupal 8 site but on the 7 ones it can't bootstrap.
After some ...
0
votes
0
answers
65
views
drush_backend_invoke_concurrent() alternatives
Release notes for Drush 10 claim that most of the Drush 9 commands will still run on Drush 10. So I wonder what is the alternative for drush_backend_invoke_concurrent() from backend.inc?
0
votes
0
answers
781
views
Drush Launcher looking for Drush in public_html when using updb
I have a drupal 8 website up and running on a server. On this server I use the Drush Launcher to work with Drush on my site.
For some reason the Drush command drush updb doesn't work I get the ...
0
votes
1
answer
193
views
It doesn't work without public_html symlink
I have just updated to Ubuntu 20.04 so have a fresh install of everything.
I have a working Drupal 7 site I'll call mysite.
I have Drush-launcher installed globally at /usr/local/bin/drush
The file ...
0
votes
0
answers
1k
views
Drush cr is responding with Bootstrap Failed
I have a Drupal 8.9 site I built on my development server. I've now copied it over to my production server (Ubuntu 16) and set up the database. I need to run drush cr to finish the process but when I ...
0
votes
0
answers
1k
views
Drush commands are not working in Xampp on Windows
In Xampp 2 Drupal sites are there.one is drupal 7.0 and another one is drupal 8.8.7.
Drush version is 8.3.5, PHP version is 7.2.22 ,composer 1.9.2
When I try enabling module in Drupal 7.0
drush en ...
0
votes
1
answer
240
views
Can't find migration when running drush migration:status
I'm trying a tutorial to migrate users data from a CSV file.
From here: https://u.group/thinking/drupal-8-csv-migration/
I've created a module as suggested. Here is the code:
/config/install/...
0
votes
0
answers
192
views
How can I execute one Drush 10 installation from any of my different sites (NOT multi-site)?
What is the proper way to install Drush 10 if I have a domain and several independently installed subdomains like described below? I want to avoid multiple drush installs.
On my shared hosting account,...