Questions tagged [installation]

Use it for questions about the installation of Drupal, modules, or themes.

Filter by
Sorted by
Tagged with
34 votes
14 answers
12k views

How to move installed modules from /sites/all/modules/* to /sites/all/contrib/modules/*

I have been searching for the answers to this question with no luck at all. From what I observe in the database structure, the location to the modules are specified in the 'system' table. The only ...
Logi's user avatar
  • 719
20 votes
4 answers
11k views

How do I programmatically install and enable a module?

There is a lot resource for doing it in Drupal 6, but I didn't find a solution for Drupal 7. How can I install and enable selected modules?
Codium's user avatar
  • 4,955
10 votes
1 answer
5k views

Managing module library dependencies with composer

I've found Dependencies in a custom module with drupal-composer, How can I include a third party library in my custom module without using Composer Manager and How to manage contrib modules composer ...
Neograph734's user avatar
  • 8,409
5 votes
1 answer
2k views

How to resolve 'Fields pending deletion' and force deletion of said field?

I'm stuck with an uninstallable module. Drupal insists that there are Fields pending deletion and that the module can not be uninstalled. I've run cron zillion times already as advised for such ...
SiliconMind's user avatar
  • 3,181
3 votes
1 answer
6k views

How do I run a site from a sub-directory?

I want to serve my Drupal site which is installed on example.com/drupal from example.com. This particular site is an add-on site on my shared host, so the actual file structure is public_html/example....
the_meter413's user avatar
0 votes
3 answers
14k views

How to get Drupal 7 installed in a sub-folder / sub-directory properly?

Currently i'm trying to installing a drupal 7 installation in a subfolder of another drupal public_html folder, but it doesnt seem to work. I am getting a redirect loop error in chrome. I already ...
Patoshi パトシ's user avatar
12 votes
11 answers
12k views

Drush CC all returning "No Drupal site found, only 'drush' cache was cleared"

I've tried other solutions, but none of them are specific to my setup. I just started using the new Linux subsystem featured in the recent Windows 10 update. I'm using WAMP x64 v3.0.6, and have ...
Kellen's user avatar
  • 457
9 votes
3 answers
38k views

Programmatically creating a content type with file field in a custom module

I'm writing a custom module, which I've done before, but this is the first time I've tried to create a content type with fields. I implemented hook_node_info and the Content Type is showing up in the ...
Kenny Wyland's user avatar
  • 3,058
7 votes
1 answer
4k views

Does hook_install() get called before or after configuration yml files are loaded?

In Drupal 8, during module install, is hook_install() called before or after loading the .yml files in config/install? I've across a module that's using both (which seems like a bad idea on its own) ...
acrosman's user avatar
  • 2,728
6 votes
4 answers
9k views

Does drush need to be installed as root?

Per http://docs.drush.org/en/master/install/ # Download latest stable release using the code below or browse to github.com/drush-ops/drush/releases. php -r "readfile('http://files.drush.org/drush....
user1032531's user avatar
3 votes
1 answer
1k views

Truncate tables before uninstalling a module in Drupal 8

I'm developing a module in Drupal 8, and because it handles quite a few relations between entities, I always need to add a bit of test data before being able to test the forms for the actual entity I'...
Jens Wegar's user avatar
1 vote
2 answers
420 views

What is the proper way to drop database references for an uninstalled drupal module?

I've uninstalled the Commerce Coupon 7.x-2.0-beta3 through the admin ui and removed the corresponding folder from the sites/all/modules directory. Now when I install the previous version of Commerce ...
dimmech's user avatar
  • 235
1 vote
1 answer
216 views

The development snapshot of Drupal causes error on my server

After having terrible errors with Drupal commons, I decided to install the standard version Drupal developing snapshot (from January 12th). The original .htaccess was not acceptable; in other words, ...
zero's user avatar
  • 353
0 votes
1 answer
1k views

How to override "active configuration" when the theme is installing?

I have a theme that imports configuration when is installed. The problem is when the configuration is already there and is active. Unable to install MYTHEME, field.field.user.user.user_picture, ...
itsdarrylnorris's user avatar
19 votes
3 answers
15k views

Quick Uninstall/Reinstall of a Custom Module

I'm working on creating a module and I'm slowly getting familiar with the Field API and what all settings work on various fields and what don't. While I'm doing this, it seems that the only way to ...
gregghz's user avatar
  • 767
18 votes
4 answers
9k views

How to get hook_install() to run all hook_update_N()?

How can i get hook_install() to run all updates that I have for my module? I have in it mymod.install file. I have tried function mymod_install() { mymod_update_6001(); } but it does not seem to ...
Lucy's user avatar
  • 1,502
12 votes
1 answer
6k views

How do I create a role programmatically?

How do I create a role programmatically? What am I doing wrong here? $role = \Drupal\user\Entity\Role::create(['id' => 'client', 'name' => 'Client']); $role->save();
Jake Lacey's user avatar
9 votes
2 answers
839 views

Best way to delete all variables when uninstalling module

I'm writing a module that writes several variables (three, four variables for every content type, and other). Which method should I use to delete them on hook_uninstall? Is it safe to perform a ...
arrubiu's user avatar
  • 3,222
9 votes
2 answers
3k views

Disabling module with config sync and removing with composer

I have an issue disabling modules, I've searched but cannot find something useful: - Developer A disable module and via composer remove it - I pull his changes so i run composer install that remove ...
Francesco's user avatar
  • 123
8 votes
4 answers
2k views

How to maintain a local mirror on my Mac?

I have a personal Drupal 6 site being hosted commercially, and I would like to maintain a mirror of the site on my local MacBook for the purposes of developing custom modules and themes before ...
Alex Basson's user avatar
8 votes
1 answer
3k views

how do I get my module to install a view?

I have developed a module in a dev environment. I built a view for it using the UI. I've exported the view, but I don't know where to put it so that an installation of the module in a fresh ...
user1359's user avatar
  • 3,909
7 votes
4 answers
17k views

Bootstrap failing with Drush 9.1.0

I had Drush 9 working before it got upgraded to 9.1.0 and am a little bit at my wits end why Bootstrap is failing and why I get "Bootstrap failed" or "! [NOTE] Drupal root not found. Pass --root or a @...
Adrained's user avatar
  • 319
6 votes
7 answers
3k views

Cannot log in to drupal admin in a new installation (access denied)

I've just made a Drupal 7 installation on localhost with XAMPP. I created an SQL database and did the installation without any error. However, when I try to login on Drupal admin from localhost/...
Tasos's user avatar
  • 193
6 votes
5 answers
3k views

How to install Drupal 7 on Ubuntu? [closed]

I'm in the process to move the development on Ubuntu 14.04. At the beginning everything seemed to work fine but quickly I discovered it was not. Installing new modules, by UI, Drupal stops without (...
joe.c's user avatar
  • 61
6 votes
1 answer
617 views

"Declaration of <function> must be compatible with <interface>" in Drupal 8.6.10

Up until Saturday I had a functioning Drupal 8.6.x instance. The I did composer update and Drupal 8.6.10 was installed. Since then I get the following in my error logs: Declaration of Drupal\Core\...
Stephen Winnall's user avatar
6 votes
2 answers
532 views

Truncate field storage tables added by module before uninstall

I've added a field via hook_entity_base_field_info(). It has data stored in it. I then go to uninstall my module and I get the following error: -> drush8 pm-uninstall massing -y The following ...
Lester Peabody's user avatar
5 votes
0 answers
3k views

Class "\Drupal\system\Controller\Http4xxController" does not exist [closed]

I'm using https://github.com/drupal-composer/drupal-project to install Drupal 8. The only thing I've changed in the composer.json is to freeze Drupal core version to 8.8.1 After Drupal installation I ...
chingis's user avatar
  • 359
4 votes
1 answer
11k views

Notice: Trying to access array offset on value of type null in while installing drupal

I am new to drupal. I have downloaded and extracted drupal into a folder. I have installed apache and PHP on my Manjaro Linux. here is my drupal specific apache conf:- Alias /noone/blogindrupal "/...
user avatar
4 votes
1 answer
3k views

Grant permission for custom role from hook_install programmatically

Drupal Version: 8.5.5 Need to assign permission to existing role during module installation: Am using below code in hook_install: use Drupal\user\RoleInterface; use Drupal\user\UserInterface; ...
JaSiMi's user avatar
  • 63
4 votes
4 answers
2k views

How to remove subdir from base URL after installing site with Composer on a shared host?

I've managed to install drupal 8 using composer and following script: composer create-project drupal-composer/drupal-project:8.x-dev my_site_name_dir --stability dev --no-interaction I decided to ...
TobiasAldgard's user avatar
3 votes
2 answers
12k views

PHP Fatal error: Class 'Drupal\Core\DrupalKernel' not found

I have installed the EntityPrint module in drupal 8 for the pdf conversion. Followed below procedure: curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=...
Prasanth R's user avatar
3 votes
1 answer
9k views

How do I setup multiple sites with one database in Drupal 7

My hosting provider limits the number of databases. I would like to setup several small sites with their own theme, modules, etc. The scripting for setting up drupal sites from my host provider uses ...
Q Beat's user avatar
  • 417
3 votes
7 answers
18k views

How do I fix this Configuration Directory sync error?

I can't get past this error while installing drupal on my localhost. I've chmod'ed permissions on my core /default directory. I've: /default on 755 /default/files including all subfolders and files ...
truth.now.forever's user avatar
3 votes
1 answer
3k views

Installing an alpha dev version with composer

Block class module has a 8.x-1.x-dev version. Installing using the recommended command from the specific release page composer require 'drupal/block_class:1.x-dev' installs a versionless ...
GiorgosK's user avatar
  • 8,443
2 votes
1 answer
498 views

How can I create Menu items through hook_install()?

Like it was said in subject, how would I do that? I need to create menu items once after module install and have the ability to edit them if needed. module.link.menu.yml won't give me that ability. ...
Eugene Monakoff's user avatar
2 votes
1 answer
200 views

The site has a mix of modules installed manually and via Composer: Can I move all to Composer?

I've inherited a Drupal 8 site where only few modules were installed via Composer; the rest was manually installed. Is there a way to fix this, and move the manually installed modules to be handled ...
quantumized's user avatar
  • 1,217
2 votes
1 answer
589 views

Cannot install Composer because it doesn't contain any .info.yml files

Newbie using clean Drupal 8 install on a server. Installed module "International Telephone," but got error. Then I read that I needed to also install Composer. When I tried to install Composer, I ...
Thom Kolton's user avatar
2 votes
2 answers
2k views

What is the proper way to uninstall a module that adds a content type

I heard that when uninstalling a module that is a content type, you should not use node_type_delete('my_module') in hook_uninstall(). Instead, you should let it be handled by Drupal that just disables ...
MyNameIsStain's user avatar
2 votes
2 answers
738 views

How do I skip language selection with installation profile?

I am building an installation profile for Drupal 7 and trying to skip the language selection page. In the .profile file I put the following code: function efocus_install_tasks_alter(&$tasks, $...
mparryy's user avatar
  • 209
1 vote
1 answer
510 views

How to remove custom module provided entity instances by the time the module being uninstalled?

I have the following use case: I have a custom module, which defines a custom entity type. The custom entity type has some content in the database. Module needs to be uninstalled now, but it can't, ...
ssibal's user avatar
  • 3,165
1 vote
1 answer
6k views

How to manually uninstall/purge modules?

I have a module Media: YouTube which is being buggy when attempting to uninstall. I disabled it in the modules along with its dependencies, and when I go to the uninstall tab and perform the uninstall ...
Anthony Miller's user avatar
1 vote
1 answer
268 views

Adding translations to installation profile upon installation

Creating an installation profile for a french site. I have hit a brick wall trying to have the profile install fr language translations. I have tried adding this to my profile as this comment http://...
stefgosselin's user avatar
  • 2,941
1 vote
4 answers
903 views

New Drupal installation not working beyond front page (not accessing database)

I just installed a new drupal 7.39 using drush. From the browser, I can only goes as far as the front page(welcome page) and no further. I cannot log-in, suggesting that drupal is not accessing the ...
okey_on's user avatar
  • 261
1 vote
3 answers
1k views

How to check if a library is present during installation?

How can I check if the library, which is required by my module, is present while the module is getting installed? I have used hook_requirements with the libraries_detect function with ...
Malabya Tewari's user avatar
1 vote
2 answers
1k views

How to disable a troublesome module that causes admin/modules to not list all modules?

I ran into an unexpected situation after installing the 7.x-2.1 of the Multilang - Embed multiple translations inside a unique node or block module. I was actually experimenting with that module to ...
Pierre.Vriens's user avatar
1 vote
1 answer
1k views

How to add a node field to a database table in a custom module

When I am writing my own custom module, and designing a database table, if I want to use the field nid to refer to a node, because I want my module to adding something to each node, how should I ...
enjoylife's user avatar
  • 3,788
0 votes
0 answers
97 views

Composer modified installation with changed /web reference in composer.json fails

Based on this question. I am running a modified composer installation. composer create-project --no-install drupal/recommended-project ./ I am changing "web" in the composer.json like so: { ...
pierostz's user avatar
  • 412
0 votes
1 answer
67 views

Why can’t I install the module after uploading it?

I uploaded the Commerce Core module (8.x-2.32) from the /admin/modules/install tab. After uploading it, the modules list shows the module as disabled. I cannot select the checkbox shown for this ...
0 votes
1 answer
871 views

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "glossify_taxonomy" plugin does not exist.

In Drupal 8 when we upload the module we will get this kind of issue very often. I have installed glossify and its submodule glossify_taxonomy and configured. we have created some content in ...
user81030's user avatar
0 votes
2 answers
3k views

"Drupal already installed" Message on Restored site

We had an issue on a Drupal 8.8.2 site, had to restore DB, Core and Vendor, now anyone visiting the site gets the site as normal, but if admin logs in I receive: Drupal 8.8.2 Drupal already installed ...
entropy1980's user avatar