drush | line shell and scripting interface | Content Management System library
kandi X-RAY | drush Summary
kandi X-RAY | drush Summary
Drush is a command line shell and Unix scripting interface for Drupal. Please see www.drush.org for documentation.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Install a drush profile .
- Run the preflight .
- Update a batch of updates .
- Get list of properties .
- Update a deploy hook .
- Get the mime - type of a file .
- List all modules .
- Get PHP keywords .
- List all views .
- Get the status of the changes
drush Key Features
drush Examples and Code Snippets
Community Discussions
Trending Discussions on drush
QUESTION
I've scoured the internet and have bits and pieces but nothing is coming together for me. I have a local Drupal environment running with Lando. I've successfully installed and configured webpack. Everything is working except when I try to watch or hot reload.
When I run lando npm run build-dev
(that currently uses webpack --watch
I can see my changes compiled successfully into the correct folder. However, when I refresh my Drupal site, I do not see that changes. The only time I see my updated JS changes are when I run lando drush cr
to clear cache. Same things are happening when I try to configure the webpack-dev-server.
I can get everything to watch for changes and compile correctly but I cannot get my browser to reload my files, they stay cached. I'm at a loss.
I've tried configuring a proxy in my .lando.yml , and have tried different things with the config options for devServer. I'm just not getting a concise answer, and I just don't have the knowledge to understand exactly what is happening. I believe it has to do with Docker containers not being exposed to webpack (??) but I don't understand how to configure this properly.
These are the scripts I have set up in my package.json
, build
outputs my production ready files into i_screamz/js/dist
, build-dev
starts a watch and compiles non-minified versions to i_screamz/js/dist-dev
- start
I have in here from trying to get the devServer to work. I'd like to get webpack-dev-server
running as I'd love to have reloading working.
ANSWER
Answered 2022-Apr-02 at 15:48I've updated my code files above to reflect reflect a final working setup with webpack. The main answer was a setting in
/web/sites/default/settings.local.php
**Disable CSS & JS aggregation. **
$config['system.performance']['css']['preprocess'] = FALSE;
$config['system.performance']['js']['preprocess'] = FALSE;
I found a working setup from saschaeggi and just tinkered around until I found this setting. So thank you! I also found more about what this means here. This issue took me way longer than I want to admit and it was so simple. I don't know why the 'Disabling Caching css/js aggregation' page never came up when I was furiously googling a caching issue. Hopefully this answer helps anyone else in this very edge case predicament.
I have webpack setup within my theme root folder with my Drupal theme files. I run everything with Lando, including NPM. I found a nifty trick to switch the dist-dev and dist libraries for development / production builds from thinkshout.
I should note my setup does not include hot-reloading but I can at least compile my files and refresh immediately and see my changes. The issue I was having before is that I would have to stop my watches to drush cr
and that workflow was ridiculous. I've never gotten hot reloading to work with with either BrowserSync or Webpack Dev Server and I might try to again but I need to move on with my life at this point.
I've also note included sass yet, so these files paths will change to include compilation and output for both .scss and .js files but this is the basic bare min setup working.
QUESTION
When I updated ddev version 1.19.0 then drush command doesn't work.
...ANSWER
Answered 2022-Mar-22 at 00:56You don't say much about your environment, but I imagine you're on macOS and you installed Docker Desktop 4.6.0+ and you enabled the experimental virtualization and VirtioFS features. Please uncheck them, they're not ready for prime time. For performance, I recommend enabling mutagen, people love it, https://ddev.readthedocs.io/en/latest/users/performance/#using-mutagen
QUESTION
I am working on two Drupal (7 and 9) projects which use PostgreSQL (based on the procedure described here). I noticed errors when they are both running at the same time: Drupal 7 will complain the variable
table does not exist, while Drupal 9 will disconnect me or display some kind of WSOD. Oddly enough, they can randomly work correctly or crash again on page reload. However, it gets perfectly fine when I turn one off.
All this makes me think of some trouble with the way I configured PostgreSQL. Could you please help me find what might be wrong in my setup?
Here is my configuration for Drupal 9. docker-compose.postgres.yaml:
...ANSWER
Answered 2022-Mar-14 at 00:27Update for DDEV v1.19+
- Postgres is now available of the box with DDEV, so there is no need for an additional service/container.
- You no longer have to use an explicit name for the container, since the networking in DDEV is now more sophisticated.
--------- Original Answer Below ----------
You're using $host = "postgres";
, please use the explicit name of the postgres container, ddev--postgres
The hostname postgres
is ambiguous inside the docker network when you're running more than one project that has a service named "postgres". So you're getting the behavior you see.
A PR to the ddev-contrib recipe would be appreciated; this has been updated in lots of the ddev-contrib recipes since the problem was discovered a year or so ago, but apparently not this one.
QUESTION
I recently upgrade drupal to 9 versions via composer. And i am getting following error in drush watchdog:show command
...ANSWER
Answered 2021-Dec-07 at 18:54Twig_Function_Function
is a deprecated class from Twig 1, the use of which was deprecated in Drupal 8 and has now been removed as Drupal 9 requires Twig 2.
In your bookmark_field module, you need to update the code to use \Twig\TwigFunction
instead of the old Twig_Function_Function
.
QUESTION
I have freshly installed drupal 9.
composer.json
...ANSWER
Answered 2021-Sep-12 at 18:52Deleted vendor directory. Ran composer install. Noticed message after installation
QUESTION
I wanted to create a simple Spring Boot projects using Intellij + the Kotlin language. I never thought i´d run into such huge problems... When i am trying to start the project i get following immediate error:
...ANSWER
Answered 2021-Jul-03 at 09:05Set the kotlin-maven-plugin version to ${kotlin.version}.
It was a bug in 1.4.x, it is fixed in 1.5.x.
QUESTION
I've been using DDEV for around 2 weeks with no issues using custom local domain names which was all working nicely until yesterday where one of my projects crashed.
Upon restarting DDEV, when trying to go to any custom local domain e.g dash.myproject.com, it results in a 500 nginx error.
If I go to ip address https://127.0.0.1:56248 My browser auto resolved to http:// and I get:
...ANSWER
Answered 2021-Apr-14 at 01:58Edit 2021-04-13: The current Docker Desktop Tech Preview for Apple M1 (RC3) works fine with ddev.
QUESTION
I'm very new to Drupal and trying to install it with composer.
My composer install went well, but now, each time I try to do something, I get this error in the console :
...ANSWER
Answered 2021-Mar-19 at 21:32Ok, this was my mistake. I did
composer selfupdate
and this was over with. :)
QUESTION
I want to install drupal console with composer from DDEV (https://ddev.readthedocs.io/en/stable/)
No problem to install Drush with DDEV
DDEV cannot be Root.
Not populating custom commands or hostadditions because running with root privileges ddev is not designed to be run with root privileges, please run as normal user and without sudo
My command :
ddev composer update drupal/console --with-dependencies
But the response is :
Dependency "composer/installers" is also a root requirement, but is not explicitly allowed. Ignoring.
Dependency "composer/installers" is also a root requirement, but is not explicitly allowed. Ignoring.
Loading composer repositories with package information Updating dependencies (including require-dev) Nothing to install or update Package container-interop/container-interop is abandoned, you should avoid using it.
Use psr/container instead. Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Generating autoload files
44 packages you are using are looking for funding.
Use the composer fund
command to find out more!
For Drush I use:
ddev drush args
I would like to do
ddev drupal args
Sorry for my language.
Thanks!!:)
...ANSWER
Answered 2020-Dec-21 at 22:55First, as far as I can tell Drupal Console is unmaintained and has been uninstallable or unreliable for more than a year, so the binary was removed from ddev.
However, that doesn't keep you from installing it in your project, ddev composer require drupal/console
. But any errors that you get are a result of problems with Drupal Console, and don't have to do with ddev.
Now, if you'd like a custom command for Drupal Console, you can create one. Just copy ~/.ddev/commands/web/drush to ~/.ddev/commands/web/drupal and edit as you see fit. This is an example of a custom command. There are other examples in ~/.ddev/commands/web. Read about custom commands in the docs.
QUESTION
I use Laravel Mix - it's a flexible way to use webpack easily.
When running watch
it will recompile dev mode builds whenever the files change. However, in order to use these there's an external build step - e.g. one project needs to call drush cc css-js
.
Is there a way to do this from the webpack.mix.js
file or other?
Sort of like:
...ANSWER
Answered 2020-Dec-13 at 15:25You can use Event Hooks in Laravel Mix.
Something along these lines:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install drush
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page