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

UF Match not functioning in Drupal 4.7

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.4
    • Fix Version/s: 1.4
    • Component/s: None
    • Labels:
      None

      Description

      System:
      PHP: PHP 4.4.1
      Drupal: HEAD (as of 3/24 at 2:30 Central Time)
      MySQL: 4.1.14
      CiviCRM: v1.4BETA rev4889M

      Problem: Drupal users are not properly sync'd to CiviCRM users. Moreover, this bug introduces bad SQL which causes CiviCRM to error out most ungraciously.

      This bug causes the following symptoms:
      1. User edit pages fail with the error:
      Array
      (
      [callback] => Array
      (
      [0] => CRM_Core_Error
      [1] => handle
      )

      [code] => -2
      [message] => DB Error: syntax error
      [mode] => 16
      [debug_info] => SELECT civicrm_contact.display_name, civicrm_email.email, civicrm_location.location_type_id, civicrm_location.id
      FROM civicrm_contact
      LEFT JOIN civicrm_location ON (civicrm_location.entity_table = 'civicrm_contact' AND
      civicrm_contact.id = civicrm_location.entity_id AND
      civicrm_location.is_primary = 1)
      LEFT JOIN civicrm_email ON (civicrm_location.id = civicrm_email.location_id AND civicrm_email.is_primary = 1)
      WHERE civicrm_contact.id = [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7]
      [type] => db_error
      [user_info] => SELECT civicrm_contact.display_name, civicrm_email.email, civicrm_location.location_type_id, civicrm_location.id
      FROM civicrm_contact
      LEFT JOIN civicrm_location ON (civicrm_location.entity_table = 'civicrm_contact' AND
      civicrm_contact.id = civicrm_location.entity_id AND
      civicrm_location.is_primary = 1)
      LEFT JOIN civicrm_email ON (civicrm_location.id = civicrm_email.location_id AND civicrm_email.is_primary = 1)
      WHERE civicrm_contact.id = [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7]
      [to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info=" SELECT civicrm_contact.display_name, civicrm_email.email, civicrm_location.location_type_id, civicrm_location.id
      FROM civicrm_contact
      LEFT JOIN civicrm_location ON (civicrm_location.entity_table = 'civicrm_contact' AND
      civicrm_contact.id = civicrm_location.entity_id AND
      civicrm_location.is_primary = 1)
      LEFT JOIN civicrm_email ON (civicrm_location.id = civicrm_email.location_id AND civicrm_email.is_primary = 1)
      WHERE civicrm_contact.id = [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7]"]
      )

      ---------------
      Note the lack of a value in "WHERE civicrm_contact.id ="

      2. When using the user sync option in civicrm/civicrm/admin/synchUser, the drupal users are erroneously matched to CiviCRM records, and the civicrm_uf_match table is not populated.

      Sync output:

      Synchronize Users to Contacts completed. Checked 3 user records. Found 3 matching contact records. Created 0 new contact records.

      From mySQL (immediately following syncing process):
      mysql> select * from civicrm_uf_match;
      Empty set (0.01 sec)

      I am unable to reproduce this bug on the sandbox, as editing the demo user's info does not fail.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              mfredrickson Mark Fredrickson
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: