Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.5.8
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Documentation Required?:None
Description
When i create a class which extends CRM_Event_Form_ManageEvent_Location and try to extend the preprocess function, i run into the message _blocks not defined.
To be clear i'm trying to implement following function
class CRM_Event_Form_ManageCursus_Location extends CRM_Event_Form_ManageEvent_Location {
function preProcess()
}
The reason this fails is inside the preprocess function of CRM_Event_Form_ManageEvent_Location, this calls a static preprocess function on CRM_Contact_Form_Location. In this function the following is defined.
if (in_array($className, array(
'CRM_Event_Form_ManageEvent_Location', 'CRM_Contact_Form_Domain')))
Which hardcodes this to those two classes. A better fix would be to make this available for all classes, but i think it's most simple to start to allow this for subclasses. I'll create a PR.