Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

The Drupal Console is a suite of tools run from a command line interface (CLI) to generate boilerplate code and interact with a Drupal 8 installation. From the ground up, it has been built to utilize the same modern PHP practices which were introduced in Drupal 8.

0
votes
2answers
62 views

How to update core and all modules and themes from CLI?

On a LAMP environment I have a Drupal 8.5.6 website which is nearly all-core with the Bartik theme and a few stable contrib modules. Nothing is customized and I have daily backups so I don't "fear" of ...
2
votes
2answers
43 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. ...
0
votes
0answers
24 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-...
2
votes
2answers
40 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 ...
0
votes
0answers
53 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,...
0
votes
0answers
31 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 ...
0
votes
1answer
12 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 ...
0
votes
1answer
32 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. ...
3
votes
1answer
27 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, ...
-2
votes
1answer
60 views

How do I create a sub-theme from CLI?

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 ...
0
votes
1answer
27 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. [...
-1
votes
1answer
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? ...
0
votes
0answers
47 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 ...
0
votes
0answers
44 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 ...
0
votes
0answers
16 views

openlayers 4.6.4 drupal 7 does not display map Admin>Structures>Openlayers

I have installed GEOS, GEOPHP module, GEOFIELD module, OPENLAYERS module and all the accessory required modules successfully in drupal 7.5.6. Using PHP 7.0, Apache2 in Ubuntu 17. As mentioned in ...
0
votes
0answers
20 views

Profiling a drupal console command

I have written a long running console command which processes and imports a large XML file. It works great, but I would like to profile it in order to make optimizations for it to run as quickly and ...
-1
votes
1answer
107 views

ShareThis Module is not working properly

I have installed the ShareThis module for sharing the contents on the social networking site. I have shared the link of the content on twitter. When the user clicks on the Shared URL, the URL looks ...
0
votes
2answers
396 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 ...
1
vote
1answer
172 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
0
votes
0answers
118 views

Importing a CSV file using Migrate option

I am trying to import a csv file using the drupal console as i couldn't use Drush as it is causing some issues. drupal config:import:single Followed the steps from here, so I used this in console ...
-1
votes
1answer
171 views

'Edit Own Content' permission missing in custom entity

I have generated a custom entity using Drupal Console. drupal generate:entity:content The entity doesn't have the permission edit own content which we usually have in node types etc... The entities ...
2
votes
1answer
619 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 ...
2
votes
2answers
435 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 ...
1
vote
2answers
629 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?
0
votes
1answer
84 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....
0
votes
2answers
209 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 ...
1
vote
3answers
158 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. [...
0
votes
2answers
54 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 --...
2
votes
1answer
204 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 ...
1
vote
0answers
350 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 ...
1
vote
1answer
255 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 ...
3
votes
2answers
1k 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?
1
vote
1answer
44 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 ...
7
votes
1answer
710 views

Define module as feature

Creating a module with Drupal Composer asks me: Define module as feature (yes/no) What does it mean?
1
vote
2answers
143 views

How do I export a content type, views as a single module

I've a view, content type, field collection, flexslider to satisfy a single user case. May I know how to export all these three as a single module.
4
votes
2answers
3k views

views exposed filter to have dropdown of entity reference in cutstom entity

I generated with drupal console utility my own module and content entity code. After I added a user entity reference field and a taxonomy term entity reference field. Now I'm listing my content with ...
2
votes
0answers
219 views

Render a view in a given language in a custom Drupal Console command

I have written a Drupal Console command that creates a huge batch of HTML snippets. This is done by rendering a view programmatically (as in this StackExchange answer) The task Now I have to create ...
9
votes
3answers
4k views

Import a single yml configuration file

Is it possible to import one single yml configuration file by specifying its path? Or a group of yml files contained in a specific module?
1
vote
1answer
30 views

Why are the commands implemented by a custom module still listed after uninstalling it?

I registered a new command via Drupal Console using drupal generate:command. I associated the command with a custom module, but after uninstalling the module and removing the module folder, the ...
3
votes
3answers
471 views

How to properly set up Drupal Console on Windows 7

I have been trying to set up Drupal Console for quite some time now on Windows 7; however, there always seems to be some kind of error which I am unable to solve. I have installed Drupal Console via ...
2
votes
1answer
135 views

Are use Drupal\Core\Form\FormStateInterface statements for a Drupal 8 hook required?

This may be obvious to expert D8 users, but; If I am implementing hook_form_alter in Drupal 8, the hook definition looks like this: hook_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $...
2
votes
1answer
464 views

Why are most of the commands missing?

Most of console commands are missing from the output of drupal list. I am using Drupal Console version 0.11.3, which outputs the following error message. [WARNING] In order to list all of the ...
3
votes
1answer
119 views

How to configure multisites for the console?

Most of console commands are not listed when using drupal list Drupal Console version 0.11.3 It issues a warning like so: [WARNING] In order to list all of the available commands you should ...
0
votes
2answers
2k views

Rebuild node access permission in drupal 8

How can I rebuild the node access permission? drupal node:access:rebuild returns the following error message. [Symfony\Component\Console\Exception\CommandNotFoundException] There are no commands ...
1
vote
2answers
2k views

How to configure programmatically a unique constraint on several fields of a custom entity?

How could I configure a unique constraint on several fields of a custom entity I have already created with drupalconsole. The purpose is not allowing insert of two record of the same entity having ...
1
vote
1answer
264 views

How do I display all available field types?

I want generate an new form in a custom module via the generate:form command. In this step, I must enter a field type. How can I get all available field types?
2
votes
1answer
1k views

How to add an specific action button in views?

Is there any way to add a specific action button in view module for an entity I've created programmatically. More specifically, I want to make a search of my entity in view, and having beside each ...
3
votes
0answers
192 views

Drupal console report that mysql extension needs to be installed

Hi I am a novice at this stuff so that might explain the following: During my Drupal 8 install I received the following: The libmysqlclient driver version 5.6.26 is less than the minimum ...
8
votes
4answers
3k views

Does Drupal Console aim to replace Drush?

Does Drupal Console (that is available for Drupal 8) aim to totally or partially replace Drush?
1
vote
0answers
215 views

How can I add fields to an entity?

I'm coming from a do-it-yourself database design background, so bare with me. Let's say I want two database tables, one of car manufacturers, and one of car models. The first table, car_make, would ...