CRM-219 Drupal Multi-site Installation Support

    Details

    • Type: New Feature
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: None
    • Fix Version/s: 1.1
    • Component/s: None
    • Labels:
      None

      Description

      Functionality and documentation for mapping civicrm domain_id's to Drupal site prefixes. Support for the following configuration options:

      1. each drupal site (prefix) maps to a different domain_id
      2. all sites (prefixes) share a common domain_id
      3. some sites share a domain_id, others have their own

      Options 1. and 2. should be configurable via auto-detection and user response during our scripted installaion. Option 3 will require manual changes to either the DB or config file(s) - which should be documented. [DGG will do doc once config method is established. Install changes may be assigned to Anil.]

        Attachments

          Activity

          [CRM-219] Drupal Multi-site Installation Support
          Donald A. Lobo added a comment -

          in settings.php, drupal has a variable called db_prefix. This is set to be either a string (which is the prefix) or an associative array. When CiviCRM is part of the install, this will always be an associative array:

          $db_prefix = array( 'default' => '', 'civicrm' => 1 );

          drupal uses table prefixing. CiviCRM hosts all data for all sites in the same set of tables and uses the 'domain_id' to segregate data between various sites. If the user wants to store contact data in a seperate area, they create a new domain (name and description). This domain gets added to civicrm_domain during the install process. The id of this record in the database table is then assigned to the 'civicrm' key in the db_prefix array

          Note that this means the following:

          1. We can set $db_prefix during the install process (i.e. we are integrated with the CS installer)

          2. We can insert/update/select a record from the civicrm db (table: civicrm_domain) during the installation process

          Donald A. Lobo added a comment -

          again, deferring the issue to the host CMS rather than civicrm. we allow differnt silos thru CIVICRM_DOMAIN_ID. The host CMS has to figure out how to control and set various fields based on each site (e.g. settings.php in drupal)

            People

            • Assignee:
              Donald A. Lobo
              Reporter:
              David Greenberg

              Dates

              • Created:
                Updated:
                Resolved: