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

            [CRM-18753] Missing class results in 500 error when extensions make API requests
            Martin Castle added a comment -

            That was nice and quick - Thanks
            Is there a patch for this so that mailings can be sent now?

            Thanks,
            Martin

            Frank J. Gómez added a comment -

            I don't believe this bug blocks sends... I think it just renders the estimator useless. Anyway, here is a patch: https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-core/pull/8489.patch.

            Martin Castle added a comment -

            Ah. OK.
            Thanks Frank - we had an issue a week or so ago where "estimating" meant that the mailing couldn't be sent and I didn't check it.

            Assumptions, eh?

            Thanks for the patch though - I'll apply that anyway to keep the smiles going.

            Thanks,
            Martin

            Eileen McNaughton added a comment -

            We did actually replace the download tarball yesterday - 4.6.18 should be fine

              People

              • Assignee:
                Eileen McNaughton
                Reporter:
                Frank J. Gómez

                Dates

                • Created:
                  Updated:
                  Resolved: