Project

General

Profile

CiviCRM for Drupal 8 installation notes » History » Revision 6

Revision 5 (Jon Goldberg, 12/24/2018 09:15 PM) → Revision 6/24 (Jon Goldberg, 01/07/2019 06:30 PM)

{{last_updated_at}} by {{last_updated_by}} 
 # CiviCRM for Drupal 8 installation notes 

 * Install Drupal 8 as normal: From the folder above your eventual webroot, run: `composer create-project drupal-composer/drupal-project:8.x-dev htdocs --stability dev --no-interaction` normal. 
 * Follow [the instructions on this gist](https://gist.github.com/dsnopek/56311dbea347874e75180883efabb620). 
 * Copy files to `<webroot>/libraries/civicrm` by using the [script on this ticket](https://lab.civicrm.org/dev/drupal/issues/9). 
 * [Hack] To get CKEditor/kcfinder working, copy it to libraries/civicrm: `cp -r $asset_source/packages/kcfinder $asset_dest/packages/`. 
 * To get `extern` scripts loading correctly, run this (to create a *second* `settings_location.php`): 

 ```bash 
 cat << EOF > $asset_source/settings_location.php 
 <?php 

 define('CIVICRM_CONFDIR', '../../../web/sites'); 
 EOF 
 ``` 

 Alternatively, set BOTH `settings_location.php` values to an absolute path, e.g. `/home/jon/local/agbud8/htdocs/web/sites/default`. 
 * To load images in CKEditor, modify `<webroot>/libraries/civicrm/packages/integration/civicrm.php`.   
 At line 60, add: 

 ```php 
     case 'Drupal8': 
       $auth_function = 'authenticate_drupal8'; 
       break; 
 ``` 

 Somewhere below that, add: 

 ```php 
 function authenticate_drupal8($config) { 
   return true; 
 } 
 ``` 

 * Add the following to `civicrm.settings.php`: 

 ```php 
 $civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = CIVICRM_UF_BASEURL . '/libraries/civicrm/'; 
 $civicrm_paths['civicrm.root']['url'] = CIVICRM_UF_BASEURL . '/libraries/civicrm/'; 
 $civicrm_setting['domain']['userFrameworkResourceURL'] = CIVICRM_UF_BASEURL . '/libraries/civicrm/'; 
 $civicrm_paths['cms.root']['path'] = '/var/www/agbud8.megaphonetech.com/htdocs/web'; 
 ```