Questions tagged [installing]

Use it for questions about installing Drupal, modules, or themes.

Filter by
Sorted by
Tagged with
34
votes
14answers
11k 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 ...
18
votes
4answers
10k 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?
9
votes
1answer
4k 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 ...
2
votes
1answer
4k views

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

Maybe I'm making this way more complicated than I need to, but I want to serve my Drupal site that I've installed at example.com/drupal from example.com. This particular site is an add-on site on my ...
0
votes
3answers
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 ...
2
votes
1answer
1k 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 ...
9
votes
10answers
9k 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 ...
9
votes
3answers
37k 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 ...
6
votes
4answers
8k 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....
4
votes
1answer
3k 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) ...
3
votes
1answer
782 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'...
0
votes
1answer
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, ...
1
vote
2answers
373 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 ...
1
vote
1answer
212 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, ...
8
votes
1answer
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 ...
18
votes
4answers
8k 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 ...
3
votes
1answer
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 ...
19
votes
3answers
14k 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 ...
8
votes
2answers
1k 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 ...
6
votes
7answers
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/...
5
votes
3answers
8k 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 @...
11
votes
1answer
4k 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();
9
votes
2answers
825 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 ...
7
votes
4answers
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 ...
6
votes
5answers
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 (...
6
votes
2answers
460 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 ...
4
votes
1answer
7k 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 "/...
3
votes
1answer
2k 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; ...
3
votes
1answer
2k 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 ...
2
votes
2answers
720 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, $...
2
votes
2answers
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 ...
1
vote
2answers
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 ...
6
votes
1answer
436 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\...
3
votes
6answers
13k 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 ...
2
votes
1answer
117 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 ...
2
votes
1answer
206 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 ...
1
vote
1answer
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 ...
1
vote
1answer
266 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://...
1
vote
1answer
432 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, ...
1
vote
1answer
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 ...
1
vote
4answers
717 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 ...
1
vote
3answers
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 ...
0
votes
2answers
103 views

Error Finding Home page for Drupal 7 Site on Ubuntu Linux [closed]

I installed Drupal more or less successfully in /var/www/html on Ubuntu Linux. However when I go to 'localhost' it still just shows the Apache home page. However, if I go anywhere WITHIN my drupal ...
0
votes
1answer
385 views

custom block's BLOCK_VISIBILITY_LISTED not working on profile installation hook_install()?

Why this cannot work in my profile installation? array( 'module' => 'views', 'delta' => 'views-block', 'theme' => $default_theme, 'status' => 1, 'weight' => 0, 'region' =&...
0
votes
1answer
490 views

Remove orphaned module data after uninstall

I have installed the xmlsitemap module, which is in alpha state. The module has an incomplete uninstall routine. Right now I am getting this error at /admin/config: User warning: The following ...
0
votes
1answer
73 views

Is it possible to declare a Javascript library dependency at Hook.info? [closed]

Below is my module.info file: name = myid description = Creates an ID template, Inputs ID form, Prints an ID and View System Statistics . core = 7.x package = CSU ;Jquery Library dependencies[] = ...
0
votes
1answer
2k views

Module Installation: Unable to create directory 'temporary://update-extraction-f781a69c/

I have searched the answers on this site and have found threads like Configuring the temporary directory which refer to this issue but could not arrive at a solution. My setup is Linux (Fedora), ...
0
votes
1answer
504 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 ...
-1
votes
1answer
76 views

Captcha image is not detected but installed and working properly

I have installed Captcha and Image Captcha submodule (included in Captcha). It works perfectly, and displays the captcha image. However, when trying to install Captcha Refresh module, I found that ...