Positive integer expected for recurring interval even when user is not making a recurring contribution
Overview
If you enabled the recurring option "Support recurring intervals" on a contribution page you can no longer submit the contribution form unless you enter a value for the recurring interval, even if you have not selected to make a recurring contribution.
Error: recurFrequencyInterval must be a positive integer
This appears to have been introduced with release 5.21.x. This is most likely a result of the work that was released in 5.21.0 with respect to the new class Civi\Payment\PropertyBag.
Reproduction steps (on demo)
- duplicate the existing donation form
- disable the pledge section
- enable recurring contributions section, select "Support recurring intervals" + "Offer installments"
- test the form, leaving the recurring options blank (ie attempt to make a single one-time donation)
Current behaviour
Returns:
Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred. recurFrequencyInterval must be a positive integer"
Expected behaviour
Should be able to submit a one-time donation without expectation of a recurring interval
Environment information
Running 5.21.1 on WordPress 5.3.2.
This is reproducible on https://dmaster.demo.civicrm.org/ (CiviCRM 5.23.alpha1) so is independent of CMS.
Comments
First reported on StackExchange: https://civicrm.stackexchange.com/questions/34436/positive-integer-expected-for-recurring-interval-even-when-user-is-not-making-a