CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • support for different civicrm version in one multi-site drupal install??
Pages: [1]

Author Topic: support for different civicrm version in one multi-site drupal install??  (Read 7082 times)

JoeMurray

  • Administrator
  • Ask me questions
  • *****
  • Posts: 578
  • Karma: 24
    • JMA Consulting
  • CiviCRM version: 4.4 and 4.5 (as of Nov 2014)
  • CMS version: Drupal, WordPress, Joomla
  • MySQL version: MySQL 5.5, 5.6, MariaDB 10.0 (as of Nov 2014)
support for different civicrm version in one multi-site drupal install??
February 04, 2009, 01:28:02 pm
Drupal 6 (and 5) allow a version of module in sites/all/modules to be overridden by one in sites/mysite.com/module.

I know in the past it was not possible to have more than one copy of civicrm codebase under docroot.

Just wondering if anything changed in that regard, so that I could install civicrm 2.2 beta on a D6 install that is supporting 2.1 for all other sites, or if I need to have a whole separate Drupal install for every version of CiviCRM I want to run?

Joe
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: support for different civicrm version in one multi-site drupal install??
February 04, 2009, 02:22:27 pm

it should work. please give it a shot and let us know

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: support for different civicrm version in one multi-site drupal install??
February 05, 2009, 02:14:59 am
Would love to see this functionality available, it would really help our ability to test sites under 2.2 before migrating people.

I gave this a shot (actually, a few) but didn't have any luck.

Attempt 1:

  • I had an existing D6 site on multisite which I wanted to trial as CiviCRM 2.2
  • Disabled the CiviCRM 2.1 modules on our test site.
  • Downloaded the 2.2-beta1 from SF, and extracted it in the sites directory.
  • Enabled the CiviCRM 2.2 module only

I got the error message,

"Fatal error: Call to undefined method CRM_Utils_System::docurl2() in /home/www-home/drupal6/sites/crmdemo.grdev.co.nz/modules/civicrm/drupal/civicrm.module on line 240".

Code: [Select]
mysql> select filename, status from system  where filename like '%civicrm%';
+-----------------------------------------------------------------------------------------------------------+--------+
| filename                                                                                                  | status |
+-----------------------------------------------------------------------------------------------------------+--------+
| sites/all/modules/civicrm/packages/drupal/simpletest/simpletest.module                                    |      0 |
| sites/all/modules/civicrm/packages/drupal/simpletest/simpletest_xmlrpc.module                             |      0 |
| sites/all/modules/civicrm/packages/drupal/simpletest_automator/simpletest_automator.module                |      0 |
| sites/crmdemo.grdev.co.nz/modules/civicrm/drupal/modules/civicrm_group_roles/civicrm_group_roles.module   |      0 |
| sites/crmdemo.grdev.co.nz/modules/civicrm/drupal/modules/civicrm_member_roles/civicrm_member_roles.module |      0 |
| sites/crmdemo.grdev.co.nz/modules/civicrm/drupal/modules/civicrm_og_sync/civicrm_og_sync.module           |      0 |
| sites/crmdemo.grdev.co.nz/modules/civicrm/drupal/civicrm.module                                           |      1 |
+-----------------------------------------------------------------------------------------------------------+--------+
7 rows in set (0.00 sec)

When I look at sites/crmdemo.grdev.co.nz/modules/civicrm/CRM/Utils/System.php, the function does appear there.

Then I realised - I need to update $civicrm_root in civicrm.settings.php as well ...

Attempt 2:

  • I had an existing D6 site on multisite which I wanted to trial as CiviCRM 2.2
  • Disabled the CiviCRM 2.1 modules on our test site.
  • Downloaded the 2.2-beta1 from SF, and extracted it in the sites directory.
  • Altered civicrm.settings.php so that it reflected the path to CiviCRM 2.2
  • Enabled the CiviCRM 2.2 module only

Then I got a different error:

Code: [Select]
backTrace

/home/www-home/drupal6/sites/crmdemo.grdev.co.nz/modules/civicrm/CRM/Core/Error.php, backtrace, 138
, handle,
/home/www-home/drupal6/sites/crmdemo.grdev.co.nz/modules/civicrm/packages/PEAR.php, call_user_func, 912
/home/www-home/drupal6/sites/crmdemo.grdev.co.nz/modules/civicrm/packages/DB.php, PEAR_Error, 966
/home/www-home/drupal6/sites/crmdemo.grdev.co.nz/modules/civicrm/packages/PEAR.php, DB_Error, 574
/home/www-home/drupal6/sites/crmdemo.grdev.co.nz/modules/civicrm/packages/DB/common.php, raiseError, 1903
/home/www-home/drupal6/sites/crmdemo.grdev.co.nz/modules/civicrm/packages/DB/mysql.php, raiseError, 898
/home/www-home/drupal6/sites/crmdemo.grdev.co.nz/modules/civicrm/packages/DB/mysql.php, mysqlRaiseError, 327
/home/www-home/drupal6/sites/crmdemo.grdev.co.nz/modules/civicrm/packages/DB/common.php, simpleQuery, 1216
/home/www-home/drupal6/sites/crmdemo.grdev.co.nz/modules/civicrm/packages/DB/DataObject.php, query, 2394
/home/www-home/drupal6/sites/crmdemo.grdev.co.nz/modules/civicrm/packages/DB/DataObject.php, _query, 1039
/home/www-home/drupal6/sites/crmdemo.grdev.co.nz/modules/civicrm/CRM/Core/DAO.php, insert, 279
/home/www-home/drupal6/sites/crmdemo.grdev.co.nz/modules/civicrm/CRM/Core/Menu.php, save, 266
/home/www-home/drupal6/sites/crmdemo.grdev.co.nz/modules/civicrm/drupal/civicrm.module, store, 751
, civicrm_enable,
/home/www-home/drupal6/drupal-6.9/includes/module.inc, call_user_func_array, 450
/home/www-home/drupal6/drupal-6.9/includes/module.inc, module_invoke, 306
/home/www-home/drupal6/drupal-6.9/modules/system/system.admin.inc, module_enable, 917
/home/www-home/drupal6/drupal-6.9/includes/form.inc, system_modules_submit, 766
/home/www-home/drupal6/drupal-6.9/includes/form.inc, form_execute_handlers, 409
/home/www-home/drupal6/drupal-6.9/includes/form.inc, drupal_process_form, 119
, drupal_get_form,
/home/www-home/drupal6/drupal-6.9/includes/menu.inc, call_user_func_array, 348
/home/www-home/drupal6/drupal-6.9/index.php, menu_execute_active_handler, 18

unrecoverable error

    Sorry. A non-recoverable error has occurred.

    'navigation': Could not find access_callback in path tree, Could not find access_arguments in path tree, Could not find page_callback in path tree, Could not find page_arguments in path tree, Could not find is_ssl in path tree

    DB Error: no such field

    Database Error Code: Unknown column 'skipBreadcrumb' in 'field list', 1054

    Return to home page.

Because I suspected this error might be related to a cached menu tree, I repeated the above process and cleared the cache before enabling CiviCRM 2.2:

Attempt 3:

  • I had an existing D6 site on multisite which I wanted to trial as CiviCRM 2.2
  • Disabled the CiviCRM 2.1 modules on our test site.
  • Downloaded the 2.2-beta1 from SF, and extracted it in the sites directory.
  • Altered civicrm.settings.php so that it reflected the path to CiviCRM 2.2
  • Used "Flush all caches" (devel.module?) to clear the blocks which might cache navigation trees
  • Enabled the CiviCRM 2.2 module only

Same result as before.

The last error does look like it needs a DB upgrade, but attempting to visit /civicrm/upgrade?reset=1 resulted in a similar backtrace.

Code: [Select]
backTrace

/home/www-home/drupal6/sites/crmdemo.grdev.co.nz/modules/civicrm/CRM/Core/Permission.php, backtrace, 229
/home/www-home/drupal6/sites/crmdemo.grdev.co.nz/modules/civicrm/CRM/Core/Invoke.php, checkMenuItem, 118
/home/www-home/drupal6/sites/crmdemo.grdev.co.nz/modules/civicrm/drupal/civicrm.module, invoke, 342
, civicrm_invoke,
/home/www-home/drupal6/drupal-6.9/includes/menu.inc, call_user_func_array, 348
/home/www-home/drupal6/drupal-6.9/index.php, menu_execute_active_handler, 18

unrecoverable error

    Sorry. A non-recoverable error has occurred.

    We experienced an unexpected error. Please file an issue with the backtrace

    Return to home page.
« Last Edit: February 05, 2009, 02:32:50 am by xurizaemon »
@xurizaemon ● www.fuzion.co.nz

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: support for different civicrm version in one multi-site drupal install??
February 05, 2009, 02:35:52 am
Just for reference: the "Custom PHP Path" directory on this test install does *not* contain any replacement code files. So both the CiviCRM 2.1 and 2.2 installs we have available are unmodified - 2.1 is SVN, 2.2 is beta1.
@xurizaemon ● www.fuzion.co.nz

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: support for different civicrm version in one multi-site drupal install??
February 05, 2009, 04:50:13 am
Quote
"Fatal error: Call to undefined method CRM_Utils_System::docurl2() in /home/www-home/drupal6/sites/crmdemo.grdev.co.nz/modules/civicrm/drupal/civicrm.module on line 240".

You will get this error when you already have 2.2 CiviCRM installed and then try to access v2.1. This is happening because in drupal system table you have modules related to v2.2.

Can you try deleting civicrm related entries from system table ?

Kurund
Found this reply helpful? Support CiviCRM

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: support for different civicrm version in one multi-site drupal install??
February 05, 2009, 11:53:05 am
Thanks, Kurund, that worked.

Here are the steps I took to make it possible to have CiviCRM 2.2 running in a per-site directory, when CiviCRM 2.1 is installed in the sites/all/modules directory.

  • Disable CiviCRM and related modules
  • Using MySQL, REMOVE the entry for CiviCRM in the system table
Code: [Select]
mysql> delete from system where filename like 'sites/all/modules/civicrm/drupal/civicrm.module' ;
  • Extract 2.2 in the per-site modules directory
  • Change civicrm.settings.php to reflect the new CiviCRM path in $civicrm_root
  • Reload the modules list and enable CiviCRM 2.2
  • Run http://example.com/civicrm/upgrade?reset=1

If these instructions work for you, please post back to confirm :)

Cheers Kurund
@xurizaemon ● www.fuzion.co.nz

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: support for different civicrm version in one multi-site drupal install??
February 06, 2009, 12:52:29 am
My multi-site structure :

v2.1: sites/civicrm21/modules/civicrm
v2.2: sites/civicrm22/modules/civicrm
trunk: sites/civicrm/modules/civicrm

As confirmed with drupal guys you cannot have same module, but multiple paths in system table.
So I created 22_system table with dump from system table and added $db_prefix = array( 'system' => '22_') in my sites/civicrm22/settings.php, which mean I have separate system table for each multi-site.

May be not recommended approach but worked for me :)

Kurund
Found this reply helpful? Support CiviCRM

Andrew_Mallis

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
    • Ideograph
Re: support for different civicrm version in one multi-site drupal install??
February 06, 2009, 03:06:48 pm
Hi.
I'm working with Joe Murray who started this thread and have tried to perform the upgrade following the above recommendations, but without success. Here is a log of what I last tried. We are running Acquia Drupal.

1. Disabled CiviCRM
2. Deleted from Drupal system table all references to civicrm modules.
3. downloaded, unpacked and fixed permissions 2.2.beta1 version of CiviCRM for drupal in /sites/mysite/modules/civicrm
4. Adjusted $civicrm_root in civicrm.settings.php to point to local module
5. Deleted all Drupal caches and rebuild theme registry using devel.module
6. Ran "UPDATE civicrm_domain SET config_backend = NULL WHERE id = 1;" on CiviCRM DB for good measure
7. Re-applied permissions on files folder
8. Deleted templates_c/ contents
7. refreshed the Drupal module listing page -- v.2.2 appears!
8. activated module

I get the same error as xurizaemon in Attemp 2 and 3.

Help!
Andrew Mallis
http://andrewmallis.com
http://ideograph.ca

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: support for different civicrm version in one multi-site drupal install??
February 09, 2009, 03:11:50 pm
Hi Andrew

EDIT: Oh, on re-reading your post I see you are dealing with EXACTLY the same case. Please ignore the below and move on to the next post!

Can you clarify please whether you are trying to upgrade a "normal" CiviCRM 2.1 install to CiviCRM 2.2, or whether you are actually trying to set up a multi-site install where most sites run CiviCRM 2.1 and one specific site uses v2.2?

I suspect it's the former, in which case a lot of the info in this thread (which relates to multi-site) won't apply to you (and that may confuse the replies you get).

You might want to create a new thread and repeat your question, to make sure you don't end up trying to solve issues which don't apply to your case.

Hope that helps - and I'm definitely not aiming to be a grumpy forum nerd here - just hoping to save you some time / grief :)

« Last Edit: February 09, 2009, 03:16:28 pm by xurizaemon »
@xurizaemon ● www.fuzion.co.nz

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: support for different civicrm version in one multi-site drupal install??
February 09, 2009, 03:16:04 pm
Andrew, my apologies for the previous post :) Can you please show us the result of this MySQL query?

Code: [Select]
SELECT filename, status from system  where filename like '%civicrm%';
That should tell us which CiviCRM module your site is attempting to load.
@xurizaemon ● www.fuzion.co.nz

Andrew_Mallis

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
    • Ideograph
Re: support for different civicrm version in one multi-site drupal install??
February 09, 2009, 04:01:23 pm
Yep. This is a multisite install.

This is the current state of my DB.

SQL query: SELECT filename, status from system where filename like '%civicrm%' LIMIT 0, 30 ;
Rows: 4
filename     status
sites/all/modules/civicrm/drupal/modules/civicrm_group_roles/civicrm_group_roles.module    0
sites/all/modules/civicrm/drupal/modules/civicrm_member_roles/civicrm_member_roles.module    0
sites/all/modules/civicrm/drupal/modules/civicrm_og_sync/civicrm_og_sync.module    0
sites/all/modules/civicrm/drupal/civicrm.module    1

HOWEVER, I made sure that ALL these rows from the system table before I started the upgrade.
Andrew Mallis
http://andrewmallis.com
http://ideograph.ca

Andrew_Mallis

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
    • Ideograph
Re: support for different civicrm version in one multi-site drupal install??
February 10, 2009, 01:28:32 pm
I got it to work!
Well, maybe not the original it, but something else.
I learned from the client that CiviCRM didn't have any data in it, so I ended up doing an install vs. an upgrade.

I went through the aforementioned steps involving clearing the drupal system tables and clearing the cache.

I deleted civicrm.settings.php from sites/default
(props to chrisivens_ for the hint)

I dumped my DB, and hit
/sites/my.multisite.com/modules/civicrm/install/install.php
OOPS!
a message saying that CiviCRM was already installed appears.
hmm...
I renamed
/sites/my.multisite.com/civicrm.settings.php

and ran it again.
Success.

a new civicrm.settings.php was created in my local sites folder automatically.
I reset my CIVICRM_TEMPLATE_COMPILEDIR variable and now I'm set.
Andrew Mallis
http://andrewmallis.com
http://ideograph.ca

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: support for different civicrm version in one multi-site drupal install??
February 17, 2009, 11:51:03 pm
It would be nice if you guys can update: http://wiki.civicrm.org/confluence/display/CRMUPCOMING/CiviCRM+for+Drupal+-+Configure+Multi-site+Installations

Kurund
Found this reply helpful? Support CiviCRM

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • support for different civicrm version in one multi-site drupal install??

This forum was archived on 2017-11-26.