Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-13679

civicrm_contact_ref installer breaks on fresh D7 install

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Duplicate
    • Affects Version/s: 4.4.0
    • Fix Version/s: 4.4.1
    • Component/s: None
    • Labels:
      None

      Description

      I get the following error on a fresh D7/CiviCRM install when installing civicrm_contact_ref:

      The following extensions will be enabled: civicrm_contact_ref
      Do you really want to continue? (y/n): y
      WD php: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table [error]
      'pancakepiglet.content_node_field' doesn't exist: UPDATE

      {content_node_field}

      SET
      module=:db_update_placeholder_0, type=:db_update_placeholder_1
      WHERE (module = :db_condition_placeholder_0) ; Array
      (
      [:db_update_placeholder_0] => civicrm_contact_ref
      [:db_update_placeholder_1] => civicrm_contact_ref_contact
      [:db_condition_placeholder_0] => civicrm_cck
      )
      in civicrm_contact_ref_install() (line 34 of
      /var/aegir/platforms/master-ourpowerbase-d7-c4.4/sites/all/modules/civicrm/drupal/modules/civicrm_contact_ref/civicrm_contact_ref.install).

      It seems as though a civicrm_contact_ref_install() function was added with:

      db_update('content_node_field')
      ->fields(array(
      'module' => 'civicrm_contact_ref',
      'type' => 'civicrm_contact_ref_contact',
      ))
      ->condition('module', 'civicrm_cck')
      ->execute();

      I'm not following Drupal development very closely these days, but some researching (http://drupal.stackexchange.com/questions/36678/how-to-determine-where-the-cck-fields-are-stored-in-database) suggests that the content_node_field table which was present via the D6 cck module has been replaced with the field_config table. I also see references to content_node_field_instance which apparently have been switched to field_config_instance.

      The field_config table has both a module and type field - so it seems like we can fix the code to perform the same action. However, the field_config_instance table doesn't have a widget_module or widget_type field so I'm not sure the best way to fix that piece.

        Attachments

          Activity

            People

            • Assignee:
              colemanw Coleman Watts
              Reporter:
              jamie Jamie McClelland
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: