CRM-12951 DB Error: syntax error in logging contact report

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.4
    • Fix Version/s: 4.3.5
    • Component/s: None
    • Labels:
      None

      Attachments

      1. Differ.php
        13 kB
        Francesc Bassas i Bullich
      2. Differ.php
        13 kB
        Francesc Bassas i Bullich

        Activity

        [CRM-12951] DB Error: syntax error in logging contact report
        Francesc Bassas i Bullich added a comment -

        This error is due to a syntax error in the /CRM/Logging/Differ.php file in line 76:

        $contactIdClause = "AND ( entity_id = %3 AND entity_table = 'civicrm_contact' ) OR (entity_id IN (SELECT note.id FROM {$this->db}.log_civicrm_note note WHERE note.entity_id = %3 AND note.entity_table = 'civicrm_contact') AND entity_table = 'civicrm_note')";

        should be

        $contactIdClause = "AND ( entity_id = %3 AND entity_table = 'civicrm_contact' ) OR (entity_id IN (SELECT note.id FROM `{$this->db}`.log_civicrm_note note WHERE note.entity_id = %3 AND note.entity_table = 'civicrm_contact') AND entity_table = 'civicrm_note')";

        note `{$this->db}`

        Francesc Bassas i Bullich added a comment -

        Fixed

        David Greenberg added a comment -

        Can u review and apply "patch" if you agree.

        Deepak Srivastava added a comment -

        Patch applied. thanks.

          People

          • Assignee:
            Deepak Srivastava
            Reporter:
            Francesc Bassas i Bullich

            Dates

            • Created:
              Updated:
              Resolved: