Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7.17
-
Fix Version/s: 4.7.23
-
Component/s: Core CiviCRM
-
Labels:
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Contributed Code
-
Verified?:Yes
Description
Within the CRM_ACL_Page_ACL class, the run() method calls the edit() method when the action is add, update, or delete. It then called the parent (CRM_Core_Page_Basic) run() method which also calls the edit() method. The result is that the form is built twice. The biggest problem here is that it means hook_civicrm_buildForm and other hooks are invoked twice.
After writing a test for this, it turns out that a total of 10 forms do this.
Note: this is distinct from the situation on some forms where hook_civicrm_buildForm is invoked twice, once for the entity custom fields form and once for the entity form itself. That is normal behavior, and the formName passed to the hook is different each time in that case.