27

There's just one step, using module_enable(): $modules = array('module1', 'module2'); // Array of module names $enable_dependencies = TRUE; // Whether or not to enable dependant modules module_enable($modules, $enable_dependencies);


22

drush dl drupal --destination=/var --drupal-project-rename=www


17

I think you didn't select English in the first step, and probably your Internet connection is behind a proxy and I guess Drupal doesn't support it. You can select English and continue or: Go to Translation server and download the specific language, the Spanish for example Copy the download file in sites/default/files/translations Continue with ...


15

The problem is in the data array change name by label: $role = \Drupal\user\Entity\Role::create(array('id' => 'client', 'label' => 'Client')); $role->save(); Or you can use: //your data array $data = array('id' => 'client', 'label' => 'Client'); //creating your role $role = \Drupal\user\Entity\Role::create($data); //saving your role $role-&...


15

NOTE The issue described in the Question has now be fixed in the latest Drush version. No, Drush does not need to be installed as root. I've submitted Drush pull #2246 to update the current Drush install instructions. This install method fixes the issue as per Drush pull #2246: # Download latest stable release using the code below or browse to github....


15

Please make sure your webserver (nginx/apache) is using the same PHP version as your cli one. For example, you may encounter this issue if your cli PHP version is PHP 7.1 and your webserver is using PHP 7.0.


13

The WYSIWYG module is not compatible with CKEditor 4, because CKEditor 4 uses double quotes " around it's version string, where CKEditor 3 used single quotes '. This breaks the version detection regex in the WYSIWYG module. You could use CKEditor 3, like Bruno suggests, or you could patch the WYSIWYG module like described here https://drupal.org/comment/...


13

This is an nginx configuration issue and discussed intensely on this page Yet curiously no solid solution could be offered. Some guy on an other page proposed a solution. I applied that proposed solution and can confirm that in works! To apply proposed solution go to your nginx configuration file under /etc/nginx/sites-available/ directory on Ubuntu and ...


12

Hopefully you're not installing Drupal 8 in the hope of using it as a stable website...it's nowhere near ready yet :) That said, the reason you're getting the error is because the PHP const keyword has only been available for use in the global scope since PHP 5.3. Drupal 8 uses const in the global scope in a lot of places (correctly, as Drupal 8 will ...


12

You can do this in hook_requirements, from the documentation: During the 'install' phase, modules can for example assert that library or server versions are available or sufficient. Note that the installation of a module can happen during installation of Drupal itself (by install.php) with an installation profile or later by hand. As a consequence,...


12

There are a few things you can do to help debug your drush. Here is what you can try: Debug output Use drush cc all -vvv This will provide you with some valuable information in terms of what Drush is doing in the background and maybe show you the actual error message. Check your settings.php Depending on your setup you may be passing in environment ...


12

Nothing wrong with that. It is recommend to have the config folder outside of the public web folder; Drupal just doesn't have that. To keep the installation simple for non-experienced users, it puts that folder in the files folder, which has to be writable anyway. Just create that folder and give Drupal write permission to it; you'll be fine.


11

You're missing the length property for the varchar column ('list'). length is required so the CREATE TABLE query will fail. From the Schema API docs: All parameters apart from 'type' are optional except that type 'numeric' columns must specify 'precision' and 'scale', and 'varchar' columns must specify 'length'.


10

I restored a backup from production locally and tried to just move things and hit admin/modules or to run registry_rebuild() but it didn't stop fatal errors from being thrown. This makes sense to me since some modules may use includes or whatever in their hook_init(), or you may have a menu router path set that depends on a module or include that Drupal can'...


10

The file's called .htaccess and it's in the root of the Drupal installation. A lot of operating systems hide files that start with a ., so that might be way you can't find it. If it's simply missing, just download a fresh copy of Drupal and copy the default .htaccess file from there.


10

Variables are cached, so deleting manually is fine so long as you invalidate that cache, e.g. db_delete('variable') ->condition('name', 'mymodule_%', 'LIKE') ->execute(); cache_clear_all('variables', 'cache_bootstrap');


10

Drupal 8 requires PHP 5.5.9 or higher (for short array syntax among other things). You'll need to upgrade your version of PHP. Source: System Requirements


9

This happened to me with a couple of modules last week; the solution was simply to run cron, allowing the fields marked for deletion to actually be deleted. After that I could uninstall the module in question without issue.


9

To take a different angle: It's very possible to do this, but you shouldn't. Your web server user should not have the capacity to write to the web root (except for designated folders like the public files folder). You should therefore not be able to delete module folders from code. Doing so presents a security risk to your server. This is one of the checks ...


9

To install gd library in ubuntu: $ sudo apt-get install php5-gd Above command will install PHP gd library in Ubuntu. Refer this question from Server Fault to install mysql-pdo driver in ubuntu


9

Yes it's safe to remove them. But I would recommend you not doing so. These modules are just tiny modules and it won't give more than 1 MB of space to your system. However, if you are no longer using a module, make sure you have uninstalled that module. If you had search module enabled and if you are no longer using it, disabling it and uninstalling it ...


9

So You Want to Build a Drupal Distro Take a look at Packaging a distribution on Drupal.org Here are the steps: Assemble the pre-requisites Create a Drush Make file Convert to a Drupal.org-specific Drush Make file Build and verify it works Commit your code to Git Release your code on Drupal.org Maintain your distribution Another great tutorial How to ...


9

No module needs to implement every hook. You can use hook_update_n() and not have a hook_install() function just fine. You'll probably at 1 point want to define hook_schema() for these tables. An easy tool to get the "drupal" schema for any mysql table (already defined) in your mysql database is the Schema module. Schema documentation: hyperlinked ...


9

update.module doesn't know about git. It only understands .info(.yml in D8) files. And .info.yml files only get their version as part of the package building process. If you look at your system.info.yml, it doesn't say anywhere that it is beta6. There is a module called git deploy, that is trying to fill that gap and extracts version information from git ...


9

I suspect you are installing Drupal (or at least trying to) on a server running PHP 7.4, which is not currently compatible with the latest version of Drupal (8.8). There is an issue on drupal.org right here that details the current problems, including yours: https://www.drupal.org/project/drupal/issues/3086374 . The highest supported version of Drupal 8.8 ...


8

The upgrade advice is the same as for installations. http://drupal.org/upgrade/finished The last step in an upgrade is to delete or move the following files from your site: install.php CHANGELOG.txt INSTALL.txt INSTALL.mysql.txt INSTALL.pgsql.txt LICENSE.txt MAINTAINERS.txt UPGRADE.txt


8

If you don't have shell access the Devel module provides such functionality. Install it and visit mysite.com/devel/reinstall.


8

Here is how you would do it with a database update using hook_update_N from another enabled module's *.install file. Then you can visit /update.php in the browser or run $ drush updb on the command line to have this code fired. /** * Enable module1 and module2. */ function MYMODULE_update_7101() { // Array of module names. $modules = ['module1', '...


8

Nope, themes do not have such a directive in their info files. Themes are supposed to be module independent. The "designed" way to do it is to move all module-dependent code to a custom module, and in relevant parts of your theme simply test for existence of data your custom module was supposed to provide.


8

Use this: drush pmi --fields=type,project,title,status,path --format=table|sort This gives you a module list with five columns: First is the type of project: module or theme. Second one is the module project, for exampe views, logintoboggan, admin_menu, etc. The third one is the installation status: enabled (in use), disabled (not in use but install info ...


Only top voted, non community-wiki answers of a minimum length are eligible