Questions tagged [drush]

Use it for questions about the command line shell and Unix scripting interface for Drupal (a.k.a. Drush).

Filter by
Sorted by
Tagged with
0
votes
0answers
8 views

Schedule a current state of a content to be publish is not working

I'm having some issues with drupal/core 8.7.7, when i crate a new content or use a content already published , i want to schedule that content to be changed from one state to another. ex: But when i ...
0
votes
0answers
33 views

Drush database issue

I have encountered an issue with Drush. I am missing a number of commands. When running a command with --debug I am told [Symfony\Component\Console\Exception\CommandNotFoundException] Command rq was ...
0
votes
0answers
45 views

Error when installing with existing configuration in docker-compose

I am new to Drupal and am attempting to set up a local development environment for an existing Drupal 8 site using docker-compose. I'm trying to make it so that when starting the docker containers it ...
0
votes
0answers
25 views

Drush on Acquia Dev Desktop is terribly slow

I'm running version 2, built Jan 9 2020, on a Windows 10 machine. I'm opening the command line via the dev desktop interface (via the small, black command line icon), and all drush commands run ...
2
votes
2answers
50 views

What's the syntax of drush generate --answers argument?

So I am trying to automate theme creation using drush. There is no documentation on how to fill the --answers argument there https://drushcommands.com/drush-9x/core/generate/ I have tried: drush ...
0
votes
0answers
23 views

Running drush updb for a multisite alias is not working

I have a multisite enviroment and I'm trying to run drush updb and drush cim for the multisites using aliases. To achieve this i created a wildcarded alias file like this in drush/sites: alias.site....
0
votes
0answers
17 views

search-index with drush fails on field_collection error

I've been rebuilding my search index using "drush search-index" for the better part of the day. There have been a few odd errors that I have handled as I went along, making some fixes in the process ...
0
votes
1answer
46 views

drush migrate:status comes back with SQLSTATE [hy000] [2002] No such file or directory

Using drush on my macOS. Using Nginx and MYSQL through brew. Website is running fine. The other drush commands work fine, drush cr, drush cc, etc. But running drush migrate:status or drush ms results ...
3
votes
2answers
91 views

Interactive Drush Script

I would like to write an interactive Drush script that potentially makes a change to all pages of a website. Let's say we would would like to change "Foo" to "Baz" on each page. We want to review ...
0
votes
1answer
22 views

How to confirm that drush-based cron is being called from crontab?

I don’t know whether this is a docksal-specific question or a general cron one, but likely the latter. I’ve set up a crontab for docksal (see https://blog.docksal.io/running-scheduled-events-with-...
0
votes
0answers
18 views

Creating site alias issue [duplicate]

Using examples/example.site.yml, I created a self.site.yml file which seemed to work fine. I get the correct values when running drush site:alias @self.stage, but when I try to run drush command @...
0
votes
0answers
63 views

Does drush stop events from firing and/or bypass event subscribers?

I'm running some migrations and have logic dependent on their Events public static function getSubscribedEvents() { $events[MigrateEvents::POST_IMPORT][] = ['onMigratePostImport']; return $...
0
votes
2answers
35 views

I get errors when I try to do anything with migrations

So I'm new to Drupal, and I'm trying to set up a migration. I followed a tutorial to import a basic csv as an article yesterday, that worked ok. There are no errors showing using the admin area of ...
1
vote
0answers
40 views

How do I install Drush 9 without Composer? [duplicate]

I'm using the Drupal image for Docker to test module development. I also want to use Drush to automate certain tasks. However, the Drush 9 installation instructions state that the only supported ...
0
votes
0answers
15 views

Error using drush to generate YML file

I am attempting to use the Migrate File Entities to Media Entities module, https://www.drupal.org/project/migrate_file_to_media I am running Drupal 8.7.10 and drush 9.7.2. in Acquia DevDesktop ver. 2....
0
votes
1answer
26 views

Use drush to install a module on all of the sites of a multisite at once

I have a Drupal 8 multisite, setup with 6 different sites. I want to install Admin Toolbar on all of them on my local dev environment (mamp / terminal / drush). I have downloaded that module using ...
0
votes
0answers
30 views

Could not initialize PECL extension even though memcached installed

I am migrating a site from one remote server to another. I have set up the new server will all the prerequisites installed memcached server and its extension too. But when I try to run drush cr I get ...
0
votes
0answers
63 views

Is it possible to update/remove/install 1 package with composer without updating everything?

I have seen a few posts answering this and saying that "composer require package" or "composer update package" will do this; but absolutely everything i do with composer attempts to update everything ...
0
votes
0answers
31 views

I can't clone a project

I have a locally multi-site. Locally Drush works perfectly fine. But When I try to clone this project in different machine I get this error in Acquia Dev Desktop: I also tried to run a Drush command ...
0
votes
1answer
48 views

Troubles with external configuration

I'm working in the creation of a custom profile. When the installation is already finished, on the configuration module /admin/config/development/configuration appears the following warning The ...
0
votes
0answers
49 views

How can I create a content type field?

How do i create a content type field using Drush or Drupal Console? I tried both ways but nothing seems to work. I am using Drush Commandline Tool 9.7.1 and Drupal Console version 1.9.4. Drush: $ ...
0
votes
0answers
49 views

How can I change the site settings email using Drush?

Env: D8/drush-9.5.2 I need to use drush to change the site details (Home->Administration->Configuration->System) Site name, Slogan, and Email address. I found the configuration key by running: ...
3
votes
1answer
54 views

How to set a yml sequence config value via drush cset

When the drupal config value (as defined in .schema.yml) is a sequence what is the correct syntax for drush config-set so that the value is a sequence not a simple string? For example, with the devel ...
0
votes
1answer
26 views

“drush sapi-i” command which calls drush_backend_batch_process() fails with “Output is empty”

I am trying to integrate ElasticSearch with Drupal and till now everything seems to be working except that the command drush sapi-i crashes with the output: > 'C:/xampp/htdocs/my-project/docroot/...
0
votes
0answers
12 views

Using lock_acquire for Drush batch operation

I am trying to improve a batch function so that it uses lock_acquire(), in order to prevent users from trying to run a large batch if it is already running. To do this, I try getting the lock in the ...
0
votes
2answers
34 views

Is there a way to create a Webform automatically via script using Drush or another method?

I'm automating a base Drupal 8 install using a bash script with Composer and Drush commands that installs Drupal and uses Drush and other methods to set my basic site configurations. I'd like to also ...
3
votes
1answer
91 views

Error “The module ldap does not exist” after composerizing project

I've inherited a tarball-based Drupal 8.7.8 project. I'm moving it to new hosting, and assuming responsibility for updates and maintenance. After updating core to 8.8.2, and updating all contrib ...
-2
votes
1answer
38 views

How can I delete vocabulary terms at a certain level?

I know there are several threads here about deleting terms with various techniques; I'm going to experiment deleting terms with drush at a certain level, say level three terms and below in the ...
0
votes
2answers
244 views

drush up fails with Unknown archive format

Today, I am getting an error message when I run the Drush download or update command. drush up -y captcha fails with Unable to extract /.tmp/drush_tmp_1582749966_5e56d90e14736/captcha-7.x-1.7....
2
votes
1answer
37 views

How to block all users not containing a pattern?

I'm trying to block all users except ones with a specific role, and would love to use something like: drush user:block !roadie.
0
votes
0answers
103 views

Database connection is not defined: default

I have installed Drupal, and Drush with composer require drush/drush:9.7.2. $ vendor/bin/drush status Drupal version : 8.8.2 Site URI : http://recommended-project.dd:8083 PHP binary : C:...
2
votes
1answer
78 views

Drupal recommended-project missing Drush [closed]

I am looking to transform from drupal-project to recommended-project and seeing some difference in the folder structure. drupal-project contains a drush folder outside'web' folder and 'composer....
0
votes
1answer
36 views

Undefined function json_decode()

When attempting to update a Drupal 7 site through the UI or Drush, I get Error: Call to undefined function json_decode() in home/xxxxx/drush/includes/output.inc, line 403 , code: 255) The server is ...
0
votes
0answers
30 views

drush commands fails if user not logged in on server

I have a task schedule in windows server 2012 R2 that triggers a batch file to generate a random password for an account in drupal and then apply that password with drush using the command "drush user:...
0
votes
0answers
23 views

Cannot disable module “monitoring” after failed upgrade

I just updated to Drupal 8.8.1 (composer update drupal/* --with-dependencies now says I'm up to date, even though I know that 8.8.2 is actually the most recent). After doing this, I can use most of ...
1
vote
0answers
35 views

Drupal Commerce 2 updating with composer

I am a retired civil servant -- NOT a developer by a long shot -- and while I have used Drupal for about 19 years, I am new to composer and drush and Drupal Commerce 2. I was able to successfully ...
1
vote
0answers
38 views

Migration executes from drush but not from UI

I have a list of migrations (custom ones but following the guidelines). The migrations have no problems being executed from console with drush mim but if I try to execute them from the migrations UI I ...
0
votes
1answer
28 views

Custom Drush command and Settigns::get(), Config::get()

how can I access site configuration when in Drush command? Global variable $config === null and when I use Config::get('key'), I get Error: Using $this when not in object context in Drupal\Core\...
1
vote
0answers
53 views

Start migration via rest or from a button within a view

I have a bunch of migrations that update a bunch of nodes. I want to automate the process and also be able to rollback / add / update specific nodes for specific migrations. Basically I need a ...
0
votes
1answer
57 views

Drupal 8 url after installation using drush site-install

I used Composer to download and install Drupal 8.8.1 on Linux and used drush site:install command for setup. Only the following lines/messages were shown after I entered drush site:install command. ...
0
votes
1answer
96 views

What are the differences between Drush 9 and 10

We are using Drupal 8.8 with Drush 9. What are the main risks and benefits of upgrading to Drush 10? The official release description is rather vague.
0
votes
0answers
36 views

Drush says “DB credentials are invalid,” but my credentials in my settings-local.php are valid

If I run drush cc all or drush --root=/path/to/my/docroot cc all, I get... No Drupal site found, only 'drush' cache was cleared. If I run drush -vd, in amongst the output I see... DB ...
1
vote
1answer
130 views

How should I setup Drush to work with Drupal 8.8.1 using Git Bash on Windows 10 [closed]

I am using a Windows computer and using Git Bash, I just installed a new 8.8.1 site and also did 'composer require drush/drush'. I can't use Drush from anywhere so I am wondering if I should have ...
1
vote
0answers
289 views

How may I fix this warning message when executing Drush commands? [closed]

I reinstalled drush 8.0.0 with the command $ composer global require drush/drush:8.* but I get this message that keeps coming up. count (): Parameter must be an array or an object that implements ...
0
votes
0answers
46 views

Why are there no pending db updates when i reset system.schema entry?

I am confused about a few things to do with db updates. I have a messed up site caused by commerce and importing configuration. I want to re-run the commerce updates to ensure that they were done (as ...
-2
votes
1answer
58 views

How do I create the database tables?

I installed composer-Git and drush and was continuing with the installation of Drupal 8 from the command line. I read that you can create the database directly from drush, while in other parts I read ...
0
votes
1answer
638 views

Bootstrap failed

I have Drupal 8.8.1 and Drush 10.1.1, both installed with Composer. I'm running the following to update my site DB: $ drush updb In BootstrapHook.php line 32: Bootstrap failed. Run your command ...
0
votes
0answers
38 views

How can I force Drush to use PHP7 [duplicate]

I have PHP5.6 and PHP7.2 installed. "php" runs 5.6 and "php72" runs 7.2. For Drupal8, I want to run 7.2, which is fine when it's called from the webserver, but when I run drush it uses 5.6. I've ...
3
votes
1answer
105 views

How to attach xdebug to drush in docker

How can I "attach" xdebug to drush in a docker container? By that I mean, how can I have xdebug show me a history of an import script? And to look at the single variables that are defined and ...
0
votes
1answer
38 views

Drush does not run command, but prints the php script

We have a special server that runs php5.x and relies on drush 5.x. PHP 7.0 is installed, but the sites on the server all run PHP5, because PHP7 breaks them. We have previously had drush 5 on it, but ...

1
2 3 4 5
38