Questions tagged [drupal-console]

Use it for the suite of tools run from a command line interface to generate boilerplate code: the Drupal Console.

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

config:import:single - Class 'Drupal\config\StorageReplaceDataWrapper' not found

When I am trying to import a single configuration file within my multisite environment, I am facing the following error: root@d655a4e6dc36:/opt/drupal/docroot# drupal --uri="3030-bronze-minnow-...
user avatar
  • 605
0 votes
1 answer
164 views

How can we restrict the access of files in public folder from anonymous users?

In my project, I am using headless Drupal with .Net on the front end. I have to use encrypted file system for the project requirements. I am encrypting the files and then decrypting using oauth token ...
user avatar
0 votes
1 answer
718 views

"PHP Warning: require(drupal.php): failed to open stream"

I have created two fresh installations of Drupal, one version 8.9.17 and the other 9.2.3 and have been trying to get the Drupal console to work so that I can generate a module. I used the following ...
user avatar
0 votes
1 answer
74 views

Argument 2 passed to Drupal\Console\Command\Test\RunCommand::__construct() must be an instance of Drupal\simpletest\TestDiscovery

I'm trying to install drupal console with Drupal 9.0.5, so I ran this command: composer require drupal/console:~1.0 However when I try run the drupal command with any arguments I get this error: root@...
user avatar
  • 498
1 vote
1 answer
941 views

How do I uninstall and remove Drupal Console from my project?

1 year ago, I installed the Drupal Console module on my site. This module seems to be completely abandoned, so I'm asking my question here. https://www.drupal.org/project/console I had installed this ...
user avatar
  • 61
0 votes
0 answers
321 views

How do you get the current directory in a command method?

In a standard Drupal 8 environment, the current working directory is override and becomes the document root of the site. This is a bit troublesome for Drupal Console command implementations that wants ...
user avatar
0 votes
1 answer
762 views

How do I install without having these errors? [closed]

So far, Drupal Commerce is the best module for e-commerce on Drupal. But now Drupal 9.0.0 was released, and when I want to install Drupal Commerce on Drupal 9, both way is out of luck. Both way I ...
user avatar
0 votes
0 answers
113 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: $ ...
user avatar
  • 2,180
0 votes
2 answers
117 views

Content type export with drupal console not working

I have a content type called slider as the image below shows: I tried the following to export the content-type: drupal config:export:content:type slider when I enter the command, I am prompted to ...
user avatar
0 votes
2 answers
577 views

Command "generate:module" is not a valid command name

I have this problem when I run command drupal generate:module. I don't know why, despite everything I did was suggested on the documentation for Drupal Console. I don't see all the possible commands, ...
user avatar
0 votes
1 answer
60 views

How can I get single keys in multi-item config objects using debug:config?

For example, in drush I can run drush cget search_api.server.iges_solr backend_config.connector_config.port and get a useful answer. ('search_api.server.iges_solr:backend_config.connector_config....
user avatar
  • 1,269
1 vote
2 answers
988 views

Composer installation of drupal console missing functions

I've been attempting to install drupal console for the first time ever. I was looking for a means of creating boiler plate modules, blocks etc. My issue is when I have finished the installation ...
user avatar
  • 1,710
0 votes
1 answer
66 views

Setup many to many relationship - custom content entity

I'm currently setting up a site and using 2 custom content entities (generated with Drupal Console) : A tenant, with some custom fields A Building, with some custom fields Theses two entities need ...
user avatar
4 votes
1 answer
350 views

Drush or Drupal console command to list modules with security updates?

Is there a command for Drupal 8.x that shows available updates? I added forms_steps 1.1 that has an SA and a security update required in the Web UI, which is saying to update to 1.2 I tried drush pm:...
user avatar
  • 193
1 vote
0 answers
598 views

How do I generate a custom content entity bundle?

I created a custom content entity with Drupal console version 1.9.2. Everything is working fine. To use all the configuration and settings of my custom entity type in different bundles, I want ...
user avatar
  • 506
3 votes
2 answers
2k views

Export Paragraph bundles

I know drupal config:export:content:type is for exporting a content type. Is there a way to do this for a Paragraph bundle? drupal config:export:paragraph:type doesn't work/exist.
user avatar
  • 237
0 votes
0 answers
194 views

Commands doen't work because of the Address module and its dependencies

When I try to use a Drupal Console command, even a simple a drupal list, I get an error. Fatal error: Class 'CommerceGuys\Addressing\AddressFormat\AddressFormatRepository' not found in /path/to/...
user avatar
  • 1
0 votes
1 answer
534 views

Clearing cache takes "long time"

I am absolutely new in Drupal. I am trying to set up my first "Hello world" module and I am playing with it. Every time I clear cache using Drupal Console, it takes 15 seconds, which is an eternity ...
user avatar
  • 131
3 votes
1 answer
33 views

Undo/redo drupal console generate:plugin:block?

I ran drupal console generate:plugin:block and made a mistake. I'd like to run it again, but I get this error: 'block' entity with ID 'my_block' already exists. I've removed the source file that ...
user avatar
  • 91
0 votes
1 answer
184 views

Command to list all media entities in console?

I have an issue in my site which is not allowing me to visit the /en/admin/content/media page. I'm looking for an approach to list and delete media entities on the command line. When I run drupal ...
user avatar
0 votes
1 answer
747 views

Migrate content from drupal8 to drupal8 programmatically with Node::load and Node::create

Basicly I want to migrate content from one drupal8 instance to another. they are mostly identical with some small changes. first step is to migrate the content type via drush gen module module and ...
user avatar
  • 268
-4 votes
2 answers
341 views

Is there a single Drush and or Drupal console command to export and import all configurations?

Normally I goto Config Sync then export all > save config tar.gz > import. Can this be achieved with one command?
user avatar
0 votes
1 answer
173 views

Custom entity translation interface

I created a new custom entity using drupal console, I enabled translation and all looks ok in code. The problem is that I don't know how to translate an entity from the admin interface, I don't see ...
user avatar
  • 3,052
3 votes
3 answers
11k views

How do I disable a module?

I am trying to disable modules in Drupal 8, and I found some solution like Drupal console, but I am not sure how to use it with XAMPP. I am unable to understand how I can disable a Drupal 8 module. ...
user avatar
  • 61
0 votes
1 answer
800 views

How come Drupal Console is not downloading all commands?

When adding Drupal Console using Composer, we are finding that the list of commands is not complete. How can I resolve the issue? Installation steps: change to root directory (/local/path/drupal-...
user avatar
  • 2,416
3 votes
2 answers
686 views

Which cache bin to clear after changing services

I made some changes to own services and now I get an error about invalid arguments. When I clear all caches everything works fine. I don't want to clear all caches in my production environment. Which ...
user avatar
0 votes
0 answers
473 views

Creating entity type using console doesn't work

I've installed Drupal 8.5.4 and followed these two steps to create a module and an entity type: Ran drupal gm and filled in the info Ran drupal geco and filled in the info (No bundles, No translation,...
user avatar
  • 305
0 votes
0 answers
301 views

run drupal console command from linux cron

I have created a .sh file which runs a drupal console command via bash. I have tried to run this script in linux cron and all other commands work with exception to the drupal console command. How ...
user avatar
0 votes
1 answer
22 views

urol executed via bash throws exception error if role has a space in it

Role name "teaching assistant" command executed is: drush @comply-all urol "teaching assistant" sdf --y if I copy and paste this it works fine. if the following command is called from a bash script ...
user avatar
  • 1
0 votes
1 answer
209 views

Problem translation of terms menu - Drupal 8.5.1 - Distribution VarBase

how are they? I have a problem with the menu item translation. when i make click in button translate i have a issue i attach image. I am using Drupal 8.5.1 and the distribution VarBase 8.x-4.16. ...
user avatar
3 votes
1 answer
101 views

Drupal console "settings:set" not working or I am doing it wrong

I wanted to use Drupal console to change some settings on a site: To set the default 403 page to "/user/login" To set user registration permission to "admin only" Following the instructions here, ...
user avatar
  • 933
3 votes
2 answers
2k views

How do I create a sub-theme from CLI? [closed]

How do I create a sub-theme using Drupal Console or Drush 9? I looked at Creating a Drupal 8 sub-theme, or sub-theme of sub-theme and the documentation of drupal generate:theme, but I didn't find ...
user avatar
0 votes
1 answer
128 views

The test:run command is missing, but other commands work fine

I installed Drupal Console, put it on my path, ran drupal init, and successfully used Drupal Console to generate a module. Now I want to run tests with drupal test:run, but I get this error. [...
user avatar
  • 933
-1 votes
1 answer
13 views

module/theme update on web hosted site question

I am new to drupal and I just installed a fresh site onto Acquia web hosting. How do I install modules and themes since I can't seem to be given direct access to the file manager via the browser? ...
user avatar
  • 31
0 votes
0 answers
123 views

Error while importing just exported content type with drupal console

I'm trying to export a content type from one drupal installation and then install it to another. I export a content type with : ../vendor/bin/drupal cect And then I try to import it to another ...
user avatar
  • 35
0 votes
0 answers
53 views

Modifying and Existing Theme in Drupal

The theme I am using has a slider -- a panel of automatically changing images to display a topic that the user can choose -- but it only shows a few slides. I want to extend it to a dozen slides. I ...
user avatar
  • 129
0 votes
3 answers
4k views

Unable to uninstall a module

When I try to uninstall the "Commerce license" module, the following error appears : drupal module:uninstall commerce_license [ERROR] SQLSTATE[42S02]: Base table or view not found: 1146 Table ...
user avatar
3 votes
1 answer
885 views

Get a list of available migration destination plugins

how can I get all available migration destination plugins? A way to ask with drupal console? like listed on Migrate destination plugin examples
user avatar
  • 327
3 votes
1 answer
1k views

Change view & edit route or URL of Entities generated by Drupal Console

I have generated a custom entity using Drupal Console. drupal generate:entity:content However, there is one serious problem. All the default route for the various operation related to that entity ...
user avatar
  • 1,348
6 votes
2 answers
4k views

How to run Drupal console command from code?

I have found a lot of documentation on how to run Drush commands from code, but I'm specifically looking on how to run a Drupal Console command from code. I have some experience in Symfony and I know ...
user avatar
  • 163
4 votes
2 answers
5k views

Execute a custom function on 'user register' or 'login'

I am new to Drupal. I want to execute my custom function every time when user registers or logins to my site. How can I do this?
user avatar
  • 63
0 votes
1 answer
105 views

How can I resolve these errors when updating the module?

I want to update Drupal Commerce to 8.x-2.0-beta7 from a clean, Composer-based installation of 8.x-2.0-beta6, following the documentation on http://docs.drupalcommerce.org/v2/getting-started/update....
user avatar
  • 1,017
1 vote
3 answers
853 views

Drupal console set site:mode

I installed a site use composer with command composer create-project drupal-composer/drupal-project:8.x-dev some-dir --stability dev --no-interaction I would like to set site mode to dev. If site ...
user avatar
  • 726
1 vote
3 answers
1k views

Why do I get an error about the modules/custom directory not existing?

I have installed Drupal 8 on Ubuntu. All works well, but I cannot create a new module using Drupal Console. When I run drupal generate:module, I get the following error message. [...
user avatar
  • 21
0 votes
2 answers
145 views

An error upon trying to execute Drupal Console

I installed Drupal 8 into on my localhost, working under Windows 7 with OpenServer. After it I tried to install Drupal Console using Composer. Namely, this way composer require drupal/console:~1.0 --...
user avatar
2 votes
1 answer
331 views

Installing latest drupal console RC via composer

I'm trying to install drupal console latest release candidate globally via composer. I run $ composer global require drupal/console:~1.0.0@rc But I get the following error: Your requirements could ...
user avatar
  • 329
1 vote
0 answers
766 views

Drupal console missing some commands

I just install Drupal Console, then adding it to my pre-installed Drupal 8 with this into the drupal folder: php ~/bin/composer.phar require drupal/console:~1.0 --prefer-dist --optimize-autoloader ...
user avatar
1 vote
1 answer
658 views

Create a distribution

How is it possible to create a new Drupal distribution based on site that I already built? I've already exported the content types using drupal config:export:content:type MYCONTENTTYPE --module ...
user avatar
  • 629
4 votes
3 answers
6k views

How do I install Drupal Console to my project with Composer?

I am running my Drupal 8 project under Acquia Dev Desktop 2 and just got Composer installed. How can I add the Drupal Console to my project?
user avatar
1 vote
1 answer
68 views

How do I download a specific version of a module?

The official documentation for Drupal Console says that the arguments for drupal module:download are the following. drupal module:download [arguments] [options] is there an argument or option to ...
user avatar
  • 11