Currently a way to install CiviCRM + Drupal 8 using Composer is following this steps.

In the near future there will be support to install CiviCRM as a php library requirement for a drupal 8 site using composer, so civicrm will be located on the vendor folder.

On Aegir (I'm testing on a BOA 3.2.2 environment) following the mentioned steps, you will be able to create the platform which is verified correctly. But If you want to create a site on the given platform, at some point you will get this error:

CiviCRM installer helper file is missing

And that is because using composer, the civicrm core is now located at /vendor/civicrm/civicrm-core

That vendor folder should be also checked. Not sure if here _provision_civicrm_get_package_path

CommentFileSizeAuthor
#4 drupal8-plus-composer-2942572-4.patch806 bytesYaazkal

Comments

Yaazkal created an issue. See original summary.

bgm’s picture

Yep, that's the correct function.

Can you test tweaking the function to also check `/vendor/civicrm/civicrm-core`?

Yaazkal’s picture

@bgm thanks for the answer.

I'll try and see if I can suggest a patch.

Yaazkal’s picture

StatusFileSize
new806 bytes

A first attempt.
This fix the error reported.

The task in Aegir is marked as "Failed" even though that the site has been actually installed, I can see the login url in the log and I was able to see the site and log in inside it. Now, task fails due to this error:

Drush command terminated abnormally due to an unrecoverable error.
Error: require_once(): Failed opening required '/data/disk/o1/static/civi_platform/vendor/civicrm/civicrm-core/..//civicrm/CRM/Core/ClassLoader.php' (include_path='/data/disk/o1/static/civi_platform/vendor/civicrm/civicrm-core/packages/:/data/disk/o1/static/civi_platform/vendor/pear/pear_exception:/data/disk/o1/static/civi_platform/vendor/pear/validate_finance_creditcard:/data/disk/o1/static/civi_platform/vendor/pear/net_socket:/data/disk/o1/static/civi_platform/vendor/pear/net_smtp:/data/disk/o1/static/civi_platform/vendor/pear/auth_sasl:/data/disk/o1/static/civi_platform/vendor/phpseclib/phpseclib/phpseclib:/data/disk/o1/static/civi_platform/vendor/civicrm/civicrm-core/vendor/tecnickcom:.:/opt/php70/lib/php') in /data/disk/o1/static/civi_platform/vendor/civicrm/civicrm-core/install/civicrm.php, line 43
-
error
The external command could not be executed due to an application error.

Not sure where in the code ..//civicrm is added to the $crmPath variable that now makes this fail.

As the task is marked as Failed I was unable to enable the CiviCRM module inside the new Drupal site due to permissions but also if I manually give permissions to the site folder to the web server it nows makes the site fail (unrecoverable) when I enable the CiviCRM module; but I'm guessing is because the civicrm tasks where effectively not finished.

  • bgm committed cab1407 on 7.x-3.x
    Issue#2942572: Fixes the CiviCRM installer on Drupal8.
    
bgm’s picture

I merged a patch in 7.x-3.x that should fix this issue:
https://gitlab.com/aegir/hosting_civicrm/commit/cab1407f4427d747aeb3256a...

The tests are failing, but it's mostly because of CiviCRM 4.6 and PHP7 incompatibilities: https://gitlab.com/aegir/hosting_civicrm/-/jobs/60960121

(I haven't really checked if the d8 tests are passing, because I assume the makefile for d8 needs to be updated)

I also tested manually installing CiviCRM on D7 and D8.

bgm’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.