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
0 answers
16 views

"Uncaught Error: Class 'Consolidation\Log\LogLevel' not found in /app/vendor/consolidation/log/src/ConsoleLogLevel.php:21"

I am using lando for the first time and having difficulties. I cloned a git repo and ran the "lando start" and "lando composer install"commands. After that, when I am trying to run ...
user avatar
  • 1
-2 votes
1 answer
28 views

How to set value on drush updb running and get that value on hook_update_N, to call specific function? [closed]

On drush updb I am trying to set parameter value (ex: drush updb {value} -> drush updb unique) to get this value on my_module_update_9001(&$value): function my_module_update_9001(&$value) { ...
user avatar
  • 1
0 votes
0 answers
44 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 ...
user avatar
-1 votes
0 answers
40 views

Status: 500 Internal Server Error

I run /path/to/drush/drush status from the shell just fine, but if I run it from a script called from cron I get this error. Status: 500 Internal Server Error Content-type: text/html; charset=UTF-8 ...
user avatar
  • 40
0 votes
1 answer
72 views

Run into issues with Drush after updating from 8.9.20 to 9.3.13

I upgraded from 8.9.20 to 9.3.13 and i did an update.php after this. I do get an error: MISSING UPDATES FOR: VIEWS The installed version of the Views module is too old to update. Update to a version ...
user avatar
0 votes
0 answers
71 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 ...
user avatar
  • 101
1 vote
1 answer
56 views

Migrate CSV to content type with paragraphs

I'm trying to import a CSV File into Content Types and Paragraphs, using Migrate module (and mainly this tutorial : https://mtech-llc.com/blog/charlotte-leon/migration-csv-data-paragraphs). For this I ...
user avatar
0 votes
1 answer
39 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-...
user avatar
  • 399
0 votes
0 answers
33 views

Change the PHP binary that should be used from Drush [duplicate]

I'm on an Ubuntu shared server hosted at pair.com. Their default PHP version is 7.4, but I was able to change it to PHP 8 for Drupal in my .htaccess; Drupal 9 works fine. My composer specifies PHP 8 ...
user avatar
  • 399
0 votes
2 answers
55 views

How exactly does drush determine PROJECTROOT and WEBROOT for a project?

In the Drush Configuration section of the official documentation it is said: drush.yml files are discovered as below, in order of precedence: Drupal site folder (e.g. sites/{example.com}/drush.yml). ...
user avatar
  • 6,916
2 votes
2 answers
44 views

Can Drush display translated messages to users?

I'm working on a module which extended DrushCommands to create custom Drush commands. The maintainer wants those custom commands to display translatable custom messages (warnings, erros) upon usage. (...
user avatar
1 vote
2 answers
125 views

Batch API drush command running once then shows Solr error

I am trying to create a drush command to run a batch process. When I run the command, the batch runs just once, and I get this error : in Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase-&...
user avatar
2 votes
1 answer
63 views

how to extend existing drush command class

Can anyone please let me know how to extend existing drush command class. I am writing a custom module which provides custom content entity and created a devel generate plugin similar to ...
user avatar
1 vote
0 answers
55 views

Uninstalled module prevent upgrade

I have been asked to upgrade a site from Drupal 8 to Drupal 9. Previously, there was a very problematic module called 'support_ticket' that caused many issues and would not properly uninstall. After a ...
user avatar
  • 1,125
1 vote
0 answers
64 views

Drush can't write to /tmp

Drush does not seem to be able to move files to the tmp folder on my local machine. Changing the tmp folder location to for instance "sites/default/files" works, but I would like to know why ...
user avatar
  • 91
-2 votes
1 answer
100 views

Drush command is not working [closed]

I have installed Drush through composer and I have installed Drush 8, but every time I type "drush" in cmd, it shows this output. using win 11 with wamp PHP 8.1 The filename, directory name,...
user avatar
0 votes
0 answers
71 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 ...
user avatar
  • 399
1 vote
1 answer
62 views

Drush site aliases not working as expected

Using drush 11 and Drupal 9 to test a local site on my Mac (using MAMP), I'm having difficulty getting site aliases to work. I used Drush Launcher to make my drush executable globally. I also created &...
user avatar
  • 399
-1 votes
1 answer
60 views

Drush using wrong PHP binary/config

Using D9 with Drush 10. MacOS/MAMP Pro. Drush 10 is installed locally using composer and is starting fine and finding the database. sqlc works fine. (I have other Drupal sites that are working just ...
user avatar
0 votes
1 answer
31 views

What does "Entity API >= 8.x-1.0-alpha3 module is now a dependency and needs to be installed before running updates" during drush updatedb mean?

I am doing a Drupal 8.6.18 to 8.9.19 update via composer. After upgrading the packages via composer, I updated the database, which shows a warning: $ vendor/bin/drush updatedb <a href="https://...
user avatar
  • 87
0 votes
1 answer
54 views

CSS, JS, ... not created by drush site:install

Drupal installation is failing after the following steps on a Debian box (database is already created and privileges granted to specific user): (user) $ composer create-project drupal/recommended-...
user avatar
  • 133
0 votes
1 answer
43 views

how to install drush 10 concurrently with 8?

I'm having some questions about installing the latest drush, and the more I search, the more conflicting advice am I getting. I need both drush 8 and 10, since I am testing both Drupal 7 and 9. I had ...
user avatar
  • 399
1 vote
0 answers
44 views

Why might a batch initiated in hook_install() sometimes not process?

I have two modules, module_alpha and module_beta. Both modules install a database table with hook_schema() which they use to track information about published nodes. Data is logged in the table with ...
user avatar
  • 7,123
0 votes
1 answer
61 views

Drush 11 incompatible with drupal/recommended-project? [closed]

https://www.drush.org/latest/install/ indicates that Drush 10 is no longer supported. Drush 11 seems to be incompatible with drupal/recommended-project:9.* due to its dependency (via drupal/core-...
user avatar
0 votes
0 answers
30 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, ...
user avatar
  • 6,637
2 votes
0 answers
43 views

Drush 10 pass alias to remote

Our remote environments are currently fronted by a Linux instance acting as the gatekeeper between the developers and the actual environments (apache and mysql instances running Drupal). This was done ...
user avatar
  • 1,134
-2 votes
2 answers
81 views

Is there any `drush` command to delete any (previously exported) setting files? [closed]

Can we use drush to simply delete any (previously exported) config-directory files?
user avatar
-3 votes
1 answer
92 views

How does `drush cim` find and handle the config-directory? [closed]

I would like to know where the config directory is, and how drush cim command exactly handles it, to be more specific: Where are the setting files imported from, can you provide me with a path ...
user avatar
2 votes
1 answer
75 views

Cannot resave nodes with entity->save(), no particular error

I'm trying to write a drush command to resave all the nodes on my site. I searched for a module and found the Resave All Nodes module, but its drush command isn't ready yet. So I decided to try to ...
user avatar
0 votes
1 answer
60 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 ...
user avatar
3 votes
1 answer
152 views

How to re-index all content for the core search engine?

Is there a way to re-index all content for the core search engine? In older versions, you could reindex with drush: drush search-reindex --immediate --verbose However, this does not appear to be an ...
user avatar
0 votes
0 answers
35 views

Mismatch in php version status vs php -v [duplicate]

I have multiple versions (7.2 and 7.4) on my ubuntu box and recently set the server to use 7.4 so that I could upgrade Drupal from 8.9 to 9.x. Drupal reports/status shows my php version as 7.2, where ...
user avatar
  • 121
0 votes
0 answers
50 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 ...
user avatar
  • 121
1 vote
1 answer
174 views

drush configuration import export order of the yml

I recently upgraded some minor versions of modules and upgraded Drupal core-recommended to 9.3.3 from 9.2.9. I followed the usual drush updatedb, drush cim -y drush cr and everything looks fine. In my ...
user avatar
  • 31
0 votes
1 answer
200 views

How to Fix drush installation - path or alias to drupal root

I had 10.6.2 working - on Centos 7 and today it is just GONE. I had to remove phpunit and apparently it took the drush pathing setup for drush with it. Now it says it is installed but the command is ...
user avatar
0 votes
2 answers
87 views

Why do some Drush commands only run from docroot?

Wondering if anyone knows why some Drush commands (with file parameters) only run from the docroot and won't run from the project/composer root? Commands such as drush sql-query and drush locale-...
user avatar
  • 907
1 vote
1 answer
102 views

Error: Call to undefined function drush_shift()

We recently moved to Drupal 9.3.0 with a composer file layout and Drush 11.0. We make use of Drush Scripts to execute website functions from Crontab. One specific case is sending a newsletter email ...
user avatar
  • 513
0 votes
0 answers
38 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 --...
user avatar
3 votes
1 answer
237 views

Status page shows "Mismatched Entity.." for a Paragraph field but Drush entup give error "..storage cannot change the schema for an existing field"

I'm stuck in a loop. The Drupal 9.3 status page shows the following error: Mismatched entity and/or field definitions The following changes were detected in the entity type and field definitions. ...
user avatar
2 votes
1 answer
81 views

How do I run the drush tests in docker?

I'm trying to improve drush, and the drush contributing guidelines state: Drush's own tests may be run within provided Docker containers (see docker-compose.yml): Start containers: docker-compose up -...
user avatar
1 vote
0 answers
39 views

Problems in collations when restoring

I'm quite lost with this issue I'm experiencing, so any clue will be appreciated. Let's start with the "symptoms". Whenever I restore a Drupal 7 site that has been previously backed up with ...
user avatar
  • 235
2 votes
1 answer
70 views

How do I switch user account in drush to test permissions?

I'm playing around with the D9 Groups module and I want to test the access control in drush, either using drush php or writing a script and using drush scr. In drush 8 I would always use drush -u to ...
user avatar
  • 620
0 votes
1 answer
62 views

Is it possible to use WSL-based Drush on a Windows 10 XAMPP and if so how?

I currently use Drupal 9 but concepts about Drupal 10 may be useful. I use Windows 10 Home with XAMPP and C:/xampp/htdocs is my web application root. I want to establish a minimal Drupal development ...
user avatar
  • 11
2 votes
0 answers
41 views

drush cr on replicated servers

I am the administrator of a Drupal site replicated on 4 servers, behind a load balancer. There is only one database that is shared by the 4 instances. When I run drush cr, is it necessary to run it on ...
user avatar
  • 43
0 votes
1 answer
38 views

SQL Error when trying to remove content type field

I was trying to create a new Content Type for my site and I chose a field name ("description") that already used for other content types. The problem occurred when saving changes as the ...
user avatar
  • 101
-1 votes
1 answer
110 views

Options for pml command with Drush 10

I just install a Drupal 9.2 site and Drush 10 to manage it. Usually I use Drush 9 and Drupal 8.9. It appear option for pml command seem not to work in Drush 10 as it do in Drush 9. Example: drush @...
user avatar
0 votes
0 answers
85 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 ...
user avatar
  • 43
3 votes
1 answer
94 views

Drush script memory problem

I'm running a long drush script and its causing memory problems. Then I tried debbuging it and I have this very simple code: $query = \Drupal::entityTypeManager()->getStorage('user'); foreach ($...
user avatar
0 votes
0 answers
104 views

Drush 10 sql-sync and multi site --uri not working

I am doing some D8 to D9 migrations and having a problem with a multisite. I upgraded my local version to drush 10 as well as on my dev server and included the drush/sites/us2.site.yml file. I can sql-...
user avatar
  • 405
1 vote
1 answer
338 views

How can I fix this query error with drush sql-sync?

I crafted my drush/sites/self.site.yml like below* and verified that drush rsync @prod:%files @self:%files worked. However, drush sql-sync @prod @self results in the following error: The command &...
user avatar
  • 537

1
2 3 4 5
40