How to securely install Drupal Thunder using composer

How to securely install Drupal Thunder using composer

Installing Drupal 8´s Thunder is somehow very complicated, but very easy too if you know the right steps:

1. From the apache root download and build the project:
​composer create-project burdamagazinorg/thunder-project thunder --stability dev --no-interaction --no-install --prefer-dist --profile

2. Go into your new folder and install:and update with dependencies
composer install && composer update --with-dependencies

3. Using your browser go to your URL and install as you normally would do
Done!

If the Status Report complains about the Slick Library not being installed rename the folder within the libraries folder:

cd /var/www/html/thunder/docroot/libraries && mv slick-carousel/ slick

Drupal8 - How to delete active configuration of a module

Drupal8 - How to delete active configuration of a module

It sometimes happens that you have to delete active configuration of a module due to some problems.
It is not enough to simply uninstall the module. There can still be active configuration that has relations to other objects within drupal.
we had issues with the File_Entity Module and solved it this way:

1. drush pm-uninstall file_entity
2. drush cr
3. drush en file_entity -y resulting in:

Drupal\Core\Config\PreExistingConfigException: Configuration objects (core.entity_view_mode.file.thumbnail) provided by file_entity already exist in active configuration in /var/www/html/laska/core/lib/Drupal/Core/Config/PreExistingConfigException.php:65

The error message that comes up (see above) shows you what kind of active config you have to disable and now you can use this to solve the problem using the following workaround:

  1. drush php
  2. Drupal::configFactory()->getEditable('core.entity_view_mode.file.thumbnail')->delete();
  3. exit
  4. drush en file_entity
  5. drush cr
drush - the powerful bash tool for Drupalistas

drush - the powerful bash tool for Drupalistas

### Enable/Disable all Noncore Modules at once ###

drush pm-list --type=module --status=enabled | sed '/\((.*)\)/!d;/[Cc]ore.*-.*[Rr]equired/d;s/.*(\(.*\)).*/\1/' | sort > noncoremod.txt
drush pm-disable $(cat noncoremod.txt)
drush pm-enable $(cat noncoremod.txt)

##### Find out which version an installation profile has #################
drush rq | grep -i 'install profile'

#### Call Drupal Status-Report via bash ##############
drush core-requirements

#### find out status of a certain Module ################
drush pm-list | grep easy_booking

######## Get almost all information there is about a certain module within a Drupal Installation #######
drush pm-info |grep views

 

  1. :
Using drush7 and drush8 on debian

Using drush7 and drush8 on debian

As Drupal8 was released i had to find a way to use drush8 with Drupal8 and Drush7 for Drupal7 sites. Having drush8 installed globally i wanted to have a simple drush7 to be used when i want to configure or setup a drupal7 site. So this simple solution works like a charm:

1. make a drush7 directory within your home directory and jump into it
sudo mkdir drush7 && cd drush7
2. Install drush 7 via composer:
 sudo composer require drush/drush:7.*
3. make an alias for drush7
sudo vi ~/.bashrc
alias drush7="~/drush7/vendor/bin/drush"

4. Test if it works
drush7 status
5. Yes, the output looks like this
Drush script:  /home/username/drush7/vendor/drush/drush/drush.php
Drush version:  7.1.0

You could of course do this with all the drush versions available, so using different versions for each usecase can be accomplished very easily.

 

 

drush dl mit Composer ersetzen

Da Composer etwaige Abhängigkeiten eines Drupal Moduls von einem anderen mitberücksichtigt macht es Sinn anstatt
drush dl
composer require

zu nutzen. Weitere Optionen für die Nutzung von composer mit Drupal wären z.B.:

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort-packages] [packages1] ... [packagesN]

 

Stichworte: 
Drupal & Drush - MYSQL_ATTR_USE_BUFFERED_QUERY in database.inc

Drupal & Drush - MYSQL_ATTR_USE_BUFFERED_QUERY in database.inc

Nach dem Umzug einer Drupal7 Seite von einem Debian 7 auf einen Debian 8  Server bekam ich beim ausführen von

drush cc all -y

die folgende Fehlermeldung:

Error: Undefined class constant 'MYSQL_ATTR_USE_BUFFERED_QUERY' in /var/www/yoursite/includes/database/mysql/database.inc, line XX

Dies ist ein Hinweis darauf das das Apache Modul pdo_mysql nicht installiert ist.

sudo apt-get install php5-gd php5-mysql

schafft hier Abhilfe.

Using two different Drush Versions on Debian Squeeze

Using two different Drush Versions on Debian Squeeze

Sometimes an accident can result in something good i have learned today. What happened?

 

While setting up my new Debian Squeeze Server a few weeks ago and stopping it due to the lack of time i tried to finish the process today. Having Drush version 4.4 installed for user root at that time i simply forgot about that. As i was logged in as user1 with root rights this time i was seeing an error message appear while trying to execute drush for user1. So i simply installed drush 5.0-dev within his home directory and wondered why

drush status

still gave me that famous

bash: drush: command not found

error. Haven´t i seen

PHP configuration     :  /my/path/to/php.ini
 Drush version         :  5.0-dev

before, suggesting that drush is there and working? Yes i have, but in the meantime i have been switching to the root user to do some work there and back to user1. This makes my system seem to forget that drush exists. Doing a simple

source .bash_profile

gets drush back for the user i am using at that moment.

Being logged in as root i can use drush v4.4. and user1 uses v5.0-dev. Great, as i can simply switch the release and play around trying different things that might not work on one of the 2 versions.

too be continued...