Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Improved formatting
Source Link
leymannx
  • 18.8k
  • 6
  • 72
  • 126

Error installing CiviCRM & Drupal 8.4 | BLT & Composer - CiviCRM must be downloaded into the libraries folder

CiviCRM must be downloaded into the libraries folder. enter image description here

CiviCRM must be downloaded into the libraries folder.

#Other things I've tried:

Other things I've tried:

I think this has to do with an autoloader issue perhaps seeing that BLT does not use the drupalDrupal composer.json file and the instructions @david-snopek posted were for the traditional Drupal installation method.

I was able to trace the error to modules/custom/civicrm-drupal/civicrm.install:125.

#Notes on my process:

Notes on my process:

  1. When running $ composer require 'phpoffice/PHPWord:dev-zend-version as 0.13.0', I noticed that composer was trying to add the dependency as:

    When running $ composer require 'phpoffice/PHPWord:dev-zend-version as 0.13.0', I noticed that Composer was trying to add the dependency as:

    "require": {
        "phpoffice/PHPWord": "dev-zend-version",
        "as 0.13.0"
    },
    
    "require": {
        "phpoffice/PHPWord": "dev-zend-version",
        "as 0.13.0"
    },
#Require civicrm-core at the requested version.
#TODO: Need to keep using my fork until 4.7.25 is released!
#composer require civicrm/civicrm-core:$CIVICRM_VERSION
composer require "civicrm/civicrm-core:dev-roundearth-$CIVICRM_VERSION as $CIVICRM_VERSION"
#Require civicrm-core at the requested version.
#TODO: Need to keep using my fork until 4.7.25 is released!
#composer require civicrm/civicrm-core:$CIVICRM_VERSION
composer require "civicrm/civicrm-core:dev-roundearth-$CIVICRM_VERSION as $CIVICRM_VERSION"

Error installing CiviCRM & Drupal 8.4 | BLT & Composer - CiviCRM must be downloaded into the libraries folder

CiviCRM must be downloaded into the libraries folder. enter image description here

#Other things I've tried:

I think this has to do with an autoloader issue perhaps seeing that BLT does not use the drupal composer.json file and the instructions @david-snopek posted were for the traditional Drupal installation method.

I was able to trace the error to modules/custom/civicrm-drupal/civicrm.install:125

#Notes on my process:

  1. When running $ composer require 'phpoffice/PHPWord:dev-zend-version as 0.13.0', I noticed that composer was trying to add the dependency as:
    "require": {
        "phpoffice/PHPWord": "dev-zend-version",
        "as 0.13.0"
    },
#Require civicrm-core at the requested version.
#TODO: Need to keep using my fork until 4.7.25 is released!
#composer require civicrm/civicrm-core:$CIVICRM_VERSION
composer require "civicrm/civicrm-core:dev-roundearth-$CIVICRM_VERSION as $CIVICRM_VERSION"

Error installing CiviCRM

CiviCRM must be downloaded into the libraries folder.

Other things I've tried:

I think this has to do with an autoloader issue perhaps seeing that BLT does not use the Drupal composer.json file and the instructions @david-snopek posted were for the traditional Drupal installation method.

I was able to trace the error to modules/custom/civicrm-drupal/civicrm.install:125.

Notes on my process:

  1. When running $ composer require 'phpoffice/PHPWord:dev-zend-version as 0.13.0', I noticed that Composer was trying to add the dependency as:

    "require": {
        "phpoffice/PHPWord": "dev-zend-version",
        "as 0.13.0"
    },
    
#Require civicrm-core at the requested version.
#TODO: Need to keep using my fork until 4.7.25 is released!
#composer require civicrm/civicrm-core:$CIVICRM_VERSION
composer require "civicrm/civicrm-core:dev-roundearth-$CIVICRM_VERSION as $CIVICRM_VERSION"
Bumped by Community user
Bumped by Community user
Bumped by Community user
better formatting
Source Link

Following the amazing work @david-snopek posted(blog post - CiviCRM & D8), posted:

I spent the better part of last evening trying to get CiviCRM up and running on a Drupal 8.4 BLT project.

Following the amazing work @david-snopek posted(blog post - CiviCRM & D8), I spent the better part of last evening trying to get CiviCRM up and running on a Drupal 8.4 BLT project.

Following the amazing work @david-snopek posted:

I spent the better part of last evening trying to get CiviCRM up and running on a Drupal 8.4 BLT project.

Source Link

Error installing CiviCRM & Drupal 8.4 | BLT & Composer - CiviCRM must be downloaded into the libraries folder

Following the amazing work @david-snopek posted(blog post - CiviCRM & D8), I spent the better part of last evening trying to get CiviCRM up and running on a Drupal 8.4 BLT project.

After trying a few different approaches, unfortunately I'm now seeing the following error when trying to enable the CiviCRM Core Module

CiviCRM must be downloaded into the libraries folder. enter image description here

No matter what I try, I can't seem to get the module to recognize that civicrm is installed.

#Other things I've tried:

  1. manually copying the [project_root]/vendor/civicrm-core into [project_root]/docroot/libraries/civicrm-core
  2. Renaming libraries/civicrm-coreto libraries/civicrm
  3. Modifying composer.json to try and install CiviCRM into the libraries folder:
  4. Creating symbolic links to the folder (my least favorite attempt)

Here is the composer.json update for number 3 above:

    "require": {
    "acquia/blt": "^8.3",
    "phpoffice/PHPWord": "dev-zend-version as 0.13.0",
    "civicrm/civicrm-core": "4.7.25"
},

...

"repositories": {
    "phpword": {
        "type": "vcs",
        "url": "https://github.com/dsnopek/PHPWord.git"
    },
    "zetacomponents-mail": {
        "type": "vcs",
        "url": "https://github.com/civicrm/zetacomponents-mail.git"
    },
    "civicrm": {
        "type": "package",
        "package": {
            "name": "civicrm/civicrm-core",
            "version": "4.7.25",
            "type": "drupal-library",
            "source": {
                "url": "https://github.com/civicrm/civicrm-core.git",
                "type": "git",
                "reference": "origin/master"
           }
        }
    }
}

source: https://gist.github.com/mortenson/a5390d99013b5b8c0254081e89bb4d47

I think this has to do with an autoloader issue perhaps seeing that BLT does not use the drupal composer.json file and the instructions @david-snopek posted were for the traditional Drupal installation method.

I was able to trace the error to modules/custom/civicrm-drupal/civicrm.install:125

/**
 * Returns the path to where CiviCRM is installed.
 *
 * @return string|void
 *
 * Recommended location for civicrm is in /libraries/civicrm [citation needed].
 * We also allow /modules/civicrm, which seems to work fine.
 */
function _civicrm_find_civicrm() {
  if ($path = drupal_get_path('module', 'civicrm')) {
    if (file_exists($path . '/CRM/Core/ClassLoader.php')) {
      return \Drupal::service('file_system')->realpath($path);
    }
  }

  $path = 'vendor/civicrm/civicrm-core';
  if (file_exists($path . '/CRM/Core/ClassLoader.php')) {
    return \Drupal::service('file_system')->realpath($path);
  }

  return NULL;
}

#Notes on my process:

I ran into a couple snags with the Gist David posted.

  1. When running $ composer require 'phpoffice/PHPWord:dev-zend-version as 0.13.0', I noticed that composer was trying to add the dependency as:
    "require": {
        "phpoffice/PHPWord": "dev-zend-version",
        "as 0.13.0"
    },

This failed but I was able to get past the issue by manually adding the dependency to the composer.json file as:

    "require": {
        "acquia/blt": "^8.3",
        "phpoffice/PHPWord": "dev-zend-version as 0.13.0",
    },

Unfortunately, I then got stuck on the next step requiring civicrm-core until I read the comment a bit closer. I believe this step is now incorrect as civicrm-core 4.7.25 has been released.

#Require civicrm-core at the requested version.
#TODO: Need to keep using my fork until 4.7.25 is released!
#composer require civicrm/civicrm-core:$CIVICRM_VERSION
composer require "civicrm/civicrm-core:dev-roundearth-$CIVICRM_VERSION as $CIVICRM_VERSION"

I was able to get past that issue by updating the additional repository via: composer config repositories.civicrm-core vcs https://github.com/civicrm/civicrm-core.git

Reference: https://www.mydropwizard.com/blog/how-install-civicrm-drupal-8-and-why-choose-it-over-pure-drupal-crm