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

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

0
votes
0answers
11 views

Automating creation of a settings.php file in a version-agnostic way

To create a latest Drupal project with a local Drush I might do for example: drt=/var/www/html composer create-project drupal-composer/drupal-project "$drt" To create a Drupal settings.php for such ...
-3
votes
0answers
29 views

Architecture best practice recommendations [closed]

We are planning to implement a Portal solution. As part of the portal, we need to deploy the Drupal Chat as well. In this regard, please recommend 1. What is the suggested App Server for Drupal ...
-3
votes
3answers
97 views

Creating a new latest-Drupal project with local-Drush, with all desired credentials in one go? [closed]

I use Ubuntu 18.04 with Bash and Apache 2.4 and I desire to automate the entire process of creating a Drupal 8 with local Drush 9 project, at least after creating a database for it (which I usually ...
-2
votes
0answers
15 views

Sitemap Generate in localhost

Can anyone please help me out to generate sitemap in localhost host with source code.I'm facing problem to generate sitemap and cant able to code of sitemap Thank you.
0
votes
1answer
16 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 ...
0
votes
2answers
112 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
48 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
70 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
55 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
61 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
53 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
14 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
39 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
31 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
91 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
29 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
55 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
45 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
20 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
136 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
557 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 ...
3
votes
1answer
250 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
126 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
220 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
670 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
652 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
816 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
86 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
242 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
228 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
59 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
213 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
385 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
309 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
2k 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
49 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
785 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
153 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
4k 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
247 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 ...
11
votes
3answers
5k 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
32 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
496 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
157 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
476 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
128 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 ...