Mix of auto renewing membership types and non-auto renewing membership types not handled properly in pricesets.
Overview
On a membership price set, it is possible to specify a mix of auto renewing memberships as well as non auto renewing memberships, but allow the selection of only one at a time (by virtue of it being a radio select). It seems CiviCRM doesn't know how to handle this properly, as it assumes that multiple options can be selected.
The code here https://github.com/civicrm/civicrm-core/blob/master/CRM/Price/BAO/PriceSet.php#L1290 seems to fetch the HTML type (which should be the deciding factor on if the payment processor is compatible with handling multiple concurrent transactions) but doesn't really do anything with it.
Reproduction steps
- Create a membership price set
- Add a price field of type radio
- Proceed to create selections having membership types selected, but be sure to include a mix of auto renewing membership types and non-auto renewing membership types
- Add the price field on a contribution page and click save.
Current behaviour
(I have tested this for PayPal - Website Payments Standard, but it should be replicable for any payment processor which doesn't support "MultipleConcurrentPayments".
Error shown when trying to save
"Price Set The membership price set associated with this online contribution allows a user to select BOTH an auto-renew AND a non-auto-renew membership. This requires submitting multiple processor transactions, and is not supported for one or more of the payment processors enabled under the Amounts tab."
Expected behaviour
The contribution form should recognize that the price field is a single select field, and therefore allow me to save the configuration.
Environment information
- Browser: Firefox 59.0.1/Chrome 78.0.3904/Safari 13
- CiviCRM: Master/5.20.0/5.19.1/5.18.2/...
- PHP: 7.0/7.1/7.2/7.3/..._
- CMS: Backdrop 1.5/Drupal 7.30/Joomla 3.3/WordPress 4.5/...
- Database: MySQL 5.7.7/MariaDB 10.4/...
- Web Server: Apache 2.4/Nginx 1.16/...