Closed (fixed)
Project:
Provision CiviCRM
Version:
6.x-1.0-beta1
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Apr 2011 at 01:42 UTC
Updated:
20 Jun 2011 at 08:07 UTC
Jump to comment: Most recent file
Comments
Comment #1
bgm commentedYou should be able to use provision_civicrm as it is right now in order to deploy a Drupal 7 with CiviCRM 4.x.
Deployment of Drupal 7 itself is done by the "provision" module. provision_civicrm does the CiviCRM installation, but I don't think there is anything very different in CiviCRM 4.x compared to 3.4, so that should work too.
The provision_civicrm module itself will be at 6.x-1.x until Aegir 2.0 comes out for Drupal 7 (and I expect Aegir 2.x to have API changes). Right now this is not a blocker to deploy D7 sites, which Aegir 1.0 can do.
I will leave this ticket open until someone confirms that CiviCRM 4 works (or not).
Comment #2
mcdruid commentedWe've tested provision_civicrm with Drupal 7.0 and CiviCRM CiviCRM-4.0-alpha3.
It looks like the current dev release works okay, but some of the new code introduced in the beta1 release doesn't work with D7 - specifically the set up of the civicron user/role.
Attached a patch which applies to beta1 and the current git HEAD which gets this working for D7.
I've fixed each problem one at a time (e.g. checking for the existence of D7 functions and using them rather than the the D6-format db_query which fails under D6) - it may be a better idea to do something like switch on the major version (as I've done before the query which updates some civi paths) and have a whole block of post-install code for D6 and one for D7.
With the patch applied, I've successfully installed D6-Civi3.4 sites, and D7-Civi4 ones.
There are a couple of other minor tweaks to fix PHP warnings, but which don't necessarily relate to D6/7 - such as "array_key_exists() expects parameter 2 to be array, string given verify.provision.inc:28"
Happy to help with tidying this up, and keen to get D7 support committed.
Comment #3
hp3kman commentedNot sure if this is related or not, but can't install a site using CiviCRM Provision with Drupal 7 and CiviCRM 4.0.0, getting the following error:
WD php: Recoverable fatal error: Argument 2 passed to db_query() must be an array, string given, called in /var/aegir/.drush/provision_civicrm/install.provision.inc on line 83 and defined in db_query() (line 2213 of /var/aegir/platforms/prod-drupal-7.0-civi-4.0.0-1.0/includes/database/database.inc).
Drush command terminated abnormally due to an unrecoverable error.
I am using a custom install profile, if that makes any difference (can post if you need it...).
Comment #4
bgm commented@mcdruid: thanks for the patch, I am doing a few tests and should commit shortly. There's only a possible tiny bug, where the module will not be enabled if the server is not running Drush 4, other than that the patch looks great.
@hp3kman: did you get that error after applying the patch from #2 ?
Comment #5
bgm commentedI applied the patch, tested with D6 and D7, and committed the patch to the master branch. Thanks!
(I tried to give proper attribution in the git commit log but did a small mistake in one of the commits, I hope that's OK)
Comment #7
mcdruid commentedHi bgm - thanks for the attribution. That's what I wanted to ask you about; I recently tried to set the author in a couple of git commits to give attribution for patches as per the instructions [1]
I only have the username for the users, and not the mail part. It worked for one user (who is also a co-maintainer on the module in question) but for the two other users I tried, I got this:
fatal: No existing author found with 'foo'
How did you manage to set me as the author? I'll update the page on d.o if you're able to point me in the right direction.
[1] http://drupal.org/node/1146430