Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Critical
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.3.0
-
Fix Version/s: 4.3.0
-
Component/s: Core CiviCRM
-
Labels:None
Description
@kurund,
On commit 41408 you applied validate to all forms.
Unfortunately (at least in the reports, it doesn't seem that it is used in a lot of places yet), it brakes the edit in place.
-
- Step to reproduce:
Create a report from template for the contibution per price list CRM_Report_Form_Price_Contributionbased
Chose nickname+contact id
the nickname is editinplace. but you get an error on blur
"Cannot read property 'settings' of undefined"
- Step to reproduce:
-
- Analysis
The issue are
- The validate plugging is dynamically adding itself to all input (that aren't disabled) under the form
- the table result in the report is under the form
- the jeditable adds dynamically a form+input
So when you exit the input field, the validation plugin kicks in, try to access some information on the form, check that on the nearest parent form, that is the "naked" form added by the edit in place, not the proper form
Got a js error and the world ends.
-
- Solutions
- On the validate, provide an option to not apply the validate to some field (there is an ignore:className option). In general, it makes the live of integrators way easier when you let an option to disable on of the default behaviour
- On the edit in place, add the class that is ignored by the validate plugin
Trying to check if upgrading the validate plugins help first, otherwise, applying the above solution
X+