Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.5.7
-
Fix Version/s: 4.6.4
-
Component/s: CiviContribute
-
Labels:None
-
Documentation Required?:None
Description
When creating a new Contribution using the back-office "New CreditCard Contribution" form, and checking the "recurring" box, there is no check that a (valid) interval ("each" <...> <units>) has been entered – contributions can be created with a recurring_interval of 0.
Digging into the code I found that this form invokes CRM_Contribute_Form_Contribution::formRule() , which misses a check for that; as opposed to the online Contribution Pages invoking CRM_Contribute_Form_Contribution_Main::formRule() .
Simply copying the check from the CRM_Contribute_Form_Contribution_Main code does fix the issue. However, I don't know why there are different code paths for this in the first place; and in fact the two formRule() functions do not look anything alike... So I'm wondering whether this is indeed the right way of fixing it? Anyone knowledgeable could investigate this? Or should I just submit a PR for the fix I have?...
BTW, I suspect this issue affects other Versions as well; but I can't confirm for sure, as our Payment Processor implementation only work with 4.5 right now.