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

Activity report SQL syntax error

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.7.23
    • Fix Version/s: 4.7.24
    • Component/s: CiviReport
    • Labels:
    • Versioning Impact:
      None (no code merged)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      After installing 4.7.23, the "Scheduled Activities" dashlet causes a "Network Error : unable to reach the server" popup, and the dashlet does not populate.

      Looks like there is an error in the SQL statement around line 870 of Report/Form/Activity.php.

      When "$this->_aclWhere" is NULL, the WHERE statement resolves as WHERE (1) ANDĀ GROUP BY, which throws a syntax error.

      I fixed it by adding an IF clause to ensure that the AND isn't included if "$this->_aclWhere" is empty.

        Attachments

          Activity

            People

            • Assignee:
              monish.deb Monish Deb
              Reporter:
              jern Jeremy Nicholls
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: