18

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 ...


18

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-&...


16

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.


15

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 ...


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

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 ...


14

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.


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

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

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,...


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

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

It's because by default port 22 (SSH) comes open in your EC2 security group, but port 80 (HTTP) is not open. You need to edit your security group. To get there, in your EC2 list, scroll all the way to the right and click on the blue security group name. You will be taken to your security group settings page, for inbound, add Custom TCP Rule of port 80 PS:...


9

The current advice is to set this via config: \Drupal::configFactory() ->getEditable('system.theme') ->set('default', $theme) ->save(); The previous method using ThemeHandlerInterface::setDefault() is now deprecated. You might need to install it first too, I'm not sure. In case you do: \Drupal::service('theme_installer')->install(['...


8

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


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 ...


8

You should be able to include this package via composer by adding some repository info. Add a package definition to your repositories section in your composer.json. The resulting repositories section may look like this: "repositories": [ { "type": "composer", "url": "https://packages.drupal.org/8" }, { "type": "package", ...


7

This isn't so much an answer as it is an expansion on the previous answer. I found these two links very helpful in figuring out what the system needs for custom fields to be added to your custom module node type. Best: http://www.sitepoint.com/creating-a-new-drupal-node-type/ Good additional info: http://public-action.org/content/drupal-7-field-api-drupal-...


7

A year or so ago I was working on a Drush command to export a working site as an installation profile. I haven't worked on it for a while, but it was my intention to use something like the Configuration Management module, or perhaps Drush CTools Export Bonus to include site configuration information with the installation profile. If you are hand-generating ...


7

That's a known issue right now. There's no way right now to hook into that automatically. And it came up a few times already here too. See this question for example: Module uninstall dependencies Beside a form or a drush command to do the cleanup, there really isn't much that you do right now, other than improving core. What I'd like to see is a message on ...


7

Not sure exactly what's going on there but I can reproduce it using the installation instructions. The problem is related to the execution path (haven't looked any deeper). If you move out of the folder you downloaded drush into and execute, it'll work. (cd ~/..; Michael/drush core-status). That's probably why it works when you su - your working directoy ...


7

New method using drupal-scaffold for greatest flexibility For Drupal 8.4.0 and greater using drush >9.0.0, drush make is deprecated and you should use a full-composer work flow as detailed in the drupal.org documentation links below. Those links do recommend using a composer project, but this may not work for everyone's web server setup. The following is ...


7

When Drupal install a module, first it installs the default configuration of the module, then it invokes its hook_install(). This is evident from ModuleInstaller::install(), which contains the following code. // Install default configuration of the module. $config_installer = \Drupal::service('config.installer'); if ($sync_status) { $...


7

Checking https://packagist.org/packages/drupal/drupal for the versions available there is NO 7.x version. Drupal 7 has no composer.json for this to command to work. You can use one of the other 2 methods mentioned on https://www.drupal.org/docs/develop/using-composer/using-composer-to-manage-drupal-site-dependencies Using https://github.com/drupal-composer/...


7

For Ubuntu 16.04 I had to run the following commands to adjust the PHP version used by Apache: sudo a2dismod php7.0 sudo a2enmod php7.2 sudo service apache2 restart


7

Instead of importing configuration as suggested previously, you could as an alternative, programmatically re-create the field. Here is some code that does that. <?php use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; // Create the user profile field and instance. FieldStorageConfig::create([ 'entity_type' => 'user', ...


7

Use "module_installer" service. $installer = \Drupal::service('module_installer'); // Or from the container. $installer = $container->get('module_installer'); // Install single module. $installer->install(['module_name']); // Install multiple modules. $installer->install(['module_name_1','module_name_2']); Also for uninstallation of the module ...


6

This cannot work, because $install_state is passed as value, not as reference. So changing it has no effects. function efocus_install_tasks_alter(&$tasks, $install_state){ $tasks['install_select_locale']['function'] = '_efocus_locale_selection'; } // local callback function function _efocus_locale_selection(&$install_state){ $install_state['...


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