CRM-2177 _crm_update_contact does not call hooks

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 1.8
    • Fix Version/s: 2.0
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description


      The contact API uses _crm_update_contact() rather than BAO methods to update contact records. This function does not call pre or post hooks.

        Attachments

          Activity

          [CRM-2177] _crm_update_contact does not call hooks
          Donald A. Lobo added a comment -

          Steve:

          Is this important to be fixed in 1.8? We are migrating all the api's to a cleaner smaller version in v2, and i'd like to defer this to 2.0 if possible

          Steve McCullough added a comment -

          I've been patching this function for my own purposes, and can continue to do so. If no one else does a lot of API+hook coding, then it seems safe to defer.

          Donald A. Lobo added a comment -

          Both web form and API should call the same BAO functions which should call the hooks. Lets clean this up a bit more in v2

          Donald A. Lobo added a comment -


          I fixed this in 2.0, BUT we need to rewrite the entire Contact API since its a wee bit too complex and does not match our new schema nicely. In general, create and update should call the same set of functions

          Manish Zope added a comment -

          Verify for 2.0

          Shailesh Lende added a comment -

          Tetsed and verified for 2.1 rev-16201.

            People

            • Assignee:
              Shailesh Lende
              Reporter:
              Steve McCullough

              Dates

              • Created:
                Updated:
                Resolved: