Skip to content
This repository has been archived by the owner on Oct 7, 2019. It is now read-only.

Aegir CiviCRM integration #46

Closed
Shwele opened this issue Sep 18, 2017 · 11 comments
Closed

Aegir CiviCRM integration #46

Shwele opened this issue Sep 18, 2017 · 11 comments

Comments

@Shwele
Copy link

Shwele commented Sep 18, 2017

Hello guys,

Finally found some information with my struggles, hopefully you will reproduce the problem and offer piece of advice or if its general issue a proper fix in the future.

I have tried enabling CiviCRM under experimental and it has failed me so many times until I realized that enabling it makes my database, well, bit broken. Broken enough to stop Aegir from verifying configuration and functioning. It is causing PDO exception looking for templatedomain_0.civicrm_domain table that doesnt exist.

In attachment there is install log from Aegir and other one is where verify fails after you enable CiviCRM option.

Thanks in advance.
install.txt
verify_fail_full.txt

@helmo
Copy link
Member

helmo commented Sep 18, 2017

The issue queue on Drupal.org is a better place for this question...
But maybe @mlutfy has a quick answer?

@mlutfy
Copy link
Contributor

mlutfy commented Sep 18, 2017

According to the install log, CiviCRM was not detected:

Calling hook drush_provision_civicrm_post_provision_install
Returned from hook drush_provision_civicrm_post_provision_install

Your verify log shows that the CiviCRM module is indeed in your platform:

Calling hook drush_provision_civicrm_pre_provision_verify
CiviCRM: found civicrm in packages
CiviCRM: civicrm is in /var/aegir/platforms/drupal-7.56/sites/all/modules/civicrm

Has anything changed between the install and the verify?

I don't see any obvious hint otherwise. You will have to debug by looking at function _provision_civicrm_get_package_info():
https://github.com/mlutfy/hosting_civicrm/blob/7.x-3.x/drush/provision_civicrm.inc#L364

@memtkmcc
Copy link

CiviCRM is supported only if present/detected during the site installation. You can't add it to already installed site, at least not yet. It seems that is what you are trying to do?

@omega8cc
Copy link

@Shwele It's a duplicate of https://www.drupal.org/node/2897465 you have already opened there some time ago. Please make sure you install the site on a platform with CiviCRM code already present and detected, after you have enabled this feature in Aegir. You can't add it once the site is already installed without CiviCRM.

@omega8cc
Copy link

@Shwele -- I can see that you are aware of this limitation, at least after reading the comments on the d.o. issue. Please follow up there. Thank you.

@omega8cc
Copy link

@Shwele -- Last important detail: please don't use hostmaster platform to install hosted sites. You should create your own platform with all expected modules. You wrote on d.o.:

It was installed via aegir, location of module is /var/aegir/hostmaster-7.x-3.11/sites/all/modules/civicrm/

This is obviously wrong place to put civicrm.

@Shwele
Copy link
Author

Shwele commented Sep 21, 2017

Just rechecked so here is what I did in simple steps.

  1. Turned on CiviCRM from hosting tab
  2. Made new site test.website.org and created civicrm database in mysql called testwebsite_civi
  3. Installed CiviCRM by going to test.website.org/sites/all/modules/civicrm/install/index.php and putting all needed inputs, installation is success
  4. After that, I need to add permissions for Aegir to manage civicrm.settings.php and recursively for files/civicrm folder. User permissions are aegir:www-data
  5. When I click to verify task and check if all is good, it fails, showing PDO exception as presented.

In the end it is corrupted so much that I cannot disable website and delete it. I have to delete it manually.

On the other note, I'm sorry for writing here too, but never got much response on drupal.org to call it success in response and ideas, saw that you were writing some issues here and that is why I wrote here as well. Ill use drupal.org for my issues in the future.

@memtkmcc
Copy link

Please don't create separate database and don't install CiviCRM manually. It's not supported. Allow Aegir to install CiviCRM tables in the Drupal database and manage permissions. It should just work.

@Shwele
Copy link
Author

Shwele commented Sep 21, 2017

Ok, just found where was my flaw.

When creating platform, I always created it without civicrm present and added after I created platform itself.

Is there a way for platform to to populate those missing fields?

@memtkmcc
Copy link

You don't need to have CiviCRM present when creating new platform. You just need to re-Verify the platform after adding any new code to it, and before installing new Drupal site.

@Shwele
Copy link
Author

Shwele commented Sep 21, 2017

Just tested it and it worked!
Now I have to be careful for old databases until we make new sites for those clients. Or there is just some set of tables that can be exported and imported?

Big thanks fellas. Its resolved and may be closed if you dont have anything to add regarding those set of tables.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants