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

Fatal error on search when ACLs are enabled

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.5
    • Fix Version/s: 4.5
    • Component/s: Core CiviCRM
    • Labels:
      None
    • Documentation Required?:
      None

      Description

      Tested this problem on 4.5b6 and 4.5b8. I don't have the permissions to replicate this on the sandbox server.

      In Civi 4.4, I had an ACL group that worked well. On upgrade to 4.5, if I'm logged in as a user in that ACL group (who does NOT have "View all CiviCRM Contacts", I get the error below when I try to do any searches. Users who can view all contacts are unaffected. Also note that QuickSearch DOES work as intended, unless I opt to run a search rather than select a single contact from the dropdown widget.

      Please let me know if there's any other info/testing I can provide!

      ------

      Sorry but we are not able to provide this at the moment.
      DB Error: no such field
      Error Details
      Database Error Code: Unknown column 'civicrm_group_contact_cache-ACL.group_id' in 'where clause', 1054
      Additional Details:

      Array
      (
      [callback] => Array
      (
      [0] => CRM_Core_Error
      [1] => handle
      )

      [code] => -19
      [message] => DB Error: no such field
      [mode] => 16
      [debug_info] => SELECT DISTINCT UPPER(LEFT(contact_a.sort_name, 1)) as sort_name FROM civicrm_contact contact_a LEFT JOIN civicrm_email ON (contact_a.id = civicrm_email.contact_id AND civicrm_email.is_primary = 1) WHERE ( ( ( ( contact_a.sort_name LIKE '%a%' ) OR ( contact_a.nick_name LIKE '%a%' ) OR ( civicrm_email.email LIKE '%a%' ) ) ) ) AND ( `civicrm_group_contact_cache-ACL`.group_id IN (24) ) AND (contact_a.is_deleted = 0) ORDER BY UPPER(LEFT(contact_a.sort_name, 1)) asc [nativecode=1054 ** Unknown column 'civicrm_group_contact_cache-ACL.group_id' in 'where clause']
      [type] => DB_Error
      [user_info] => SELECT DISTINCT UPPER(LEFT(contact_a.sort_name, 1)) as sort_name FROM civicrm_contact contact_a LEFT JOIN civicrm_email ON (contact_a.id = civicrm_email.contact_id AND civicrm_email.is_primary = 1) WHERE ( ( ( ( contact_a.sort_name LIKE '%a%' ) OR ( contact_a.nick_name LIKE '%a%' ) OR ( civicrm_email.email LIKE '%a%' ) ) ) ) AND ( `civicrm_group_contact_cache-ACL`.group_id IN (24) ) AND (contact_a.is_deleted = 0) ORDER BY UPPER(LEFT(contact_a.sort_name, 1)) asc [nativecode=1054 ** Unknown column 'civicrm_group_contact_cache-ACL.group_id' in 'where clause']
      [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT DISTINCT UPPER(LEFT(contact_a.sort_name, 1)) as sort_name FROM civicrm_contact contact_a LEFT JOIN civicrm_email ON (contact_a.id = civicrm_email.contact_id AND civicrm_email.is_primary = 1) WHERE ( ( ( ( contact_a.sort_name LIKE '%a%' ) OR ( contact_a.nick_name LIKE '%a%' ) OR ( civicrm_email.email LIKE '%a%' ) ) ) ) AND ( `civicrm_group_contact_cache-ACL`.group_id IN (24) ) AND (contact_a.is_deleted = 0) ORDER BY UPPER(LEFT(contact_a.sort_name, 1)) asc [nativecode=1054 ** Unknown column 'civicrm_group_contact_cache-ACL.group_id' in 'where clause']"]
      )

        Attachments

          Activity

            People

            • Assignee:
              monish.deb Monish Deb
              Reporter:
              palantejon Jon K Goldberg
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: