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

Missing class results in 500 error when extensions make API requests

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Critical
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.6.17
    • Fix Version/s: 4.6.18
    • Component/s: CiviCRM API
    • Labels:
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      In backporting some 4.7 code to 4.6, a class was left out. The new code references CRM_Utils_SQL, which exists only in 4.7.

      It was discovered during development of CiviVolunteer, and triggered by a client-side call to VolunteerProjectContact.get. Users will experience this as a white screen when visiting the New Project screen (e.g., http://example.org/civicrm/vol/#/volunteer/manage/0). The console shows:

      Failed to load resource: the server responded with a status of 500 (Internal Server Error)
      http://example.org/civicrm/ajax/rest?entity=VolunteerProjectContact&action=get&json=%7B%22sequential%22%3A1%2C%22project_id%22%3A%220%22%7D

      There is some murkiness as to why this problem wasn't covered by the test suite. Eileen's quick guess is that perhaps some extensions APIs, not being connected to "real" entities, behave differently, causing some of the fallback "get" functions that don't get used in core to be invoked.

      Adding in the missing class from the head of the master branch resolves the problem.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                eileen Eileen McNaughton
                Reporter:
                pittstains Frank J. Gómez
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: