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

When you have multiple modules that use hook_civicrm_validate, only one of the hooks works

    Details

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

      Description

      Right now I have one huge sprawling drupal module that does most of the customizations for our CiviCRM site. I'm splitting it out into separate modules so things will be more organized.

      But I discovered that if two modules both implement hook_civicrm_validate, the hook only counts for the first one. The hook_civicrm_validate hook gets run in both modules, but if the first module validates fine and the second module returns an errors array, those errors get ignored and the form as a whole validates when it shouldn't.

      The only work-around right now is to put all of my hook_civicrm_validate code in the same module.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              micah Micah Lee
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: