Questions tagged [console]
Use it for the suite of tools run from a command line interface to generate boilerplate code: Drupal Console.
66
questions
0
votes
1
answer
694
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 ...
0
votes
1
answer
2k
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 ...
0
votes
1
answer
110
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@...
1
vote
1
answer
2k
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 ...
0
votes
1
answer
669
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 ...
0
votes
1
answer
839
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 ...
0
votes
0
answers
182
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: $ ...
0
votes
2
answers
145
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 ...
0
votes
2
answers
710
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, ...
0
votes
1
answer
70
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....
1
vote
2
answers
1k
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 ...
0
votes
1
answer
84
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 ...
4
votes
1
answer
480
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:...
1
vote
0
answers
700
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 ...
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.
0
votes
0
answers
225
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/...
0
votes
1
answer
818
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 ...
3
votes
1
answer
36
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 ...
0
votes
1
answer
202
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 ...
0
votes
1
answer
800
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 ...
-4
votes
2
answers
594
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?
0
votes
1
answer
202
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 ...
3
votes
3
answers
14k
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
1
answer
886
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-...
3
votes
2
answers
852
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
0
answers
480
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
0
answers
332
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
1
answer
24
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
1
answer
246
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
1
answer
103
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, ...
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 ...
0
votes
1
answer
139
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
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? ...
0
votes
0
answers
126
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
0
answers
57
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
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 ...
5
votes
1
answer
1k
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
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 ...
6
votes
2
answers
5k
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 ...
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?
0
votes
1
answer
107
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....
1
vote
3
answers
941
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
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.
[...
0
votes
2
answers
148
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
1
answer
345
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
1
answer
671
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 ...
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?
1
vote
1
answer
73
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 ...
10
votes
2
answers
2k
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
2
answers
387
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.