New contribution can't be saved when validation fails on first try
- Define a premium product.
- Contributions - New Contribution
- Fill out the contact and the amount, but forget, let's say, the financial type.
- Click save.
- Ok it warns you and reloads the form.
- Now pick Donation.
- Click save.
INSERT INTO `civicrm_contribution_product` (`product_id` , `contribution_id` , `fulfilled_date` ) VALUES ( 0 , 96 , NULL ) [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`dmastercivi_g5lis`.`civicrm_contribution_product`, CONSTRAINT `FK_civicrm_contribution_product_product_id` FOREIGN KEY (`product_id`) REFERENCES `civicrm_product` (`id`) ON DELETE CASCADE)]
I'm also getting a variation sometimes about receipt_date. Not sure the exact reproduction steps.
INSERT INTO `civicrm_contribution` (`contact_id` , `financial_type_id` , `contribution_page_id` , `payment_instrument_id` , `receive_date` , `total_amount` , `fee_amount` , `net_amount` , `trxn_id` , `invoice_id` , `currency` , `cancel_date` , `cancel_reason` , `receipt_date` , `thankyou_date` , `source` , `is_pay_later` , `contribution_status_id` , `check_number` , `campaign_id` , `creditnote_id` , `tax_amount` ) VALUES ( 193 , 1 , NULL , 4 , 20210903234000 , 12 , 0 , 12 , NULL , NULL , 'USD' , NULL , NULL , 19 , NULL , NULL , 0 , 1 , NULL , NULL , NULL , 0 ) [nativecode=1292 ** Incorrect datetime value: '19' for column `dmastercivi_g5lis`.`civicrm_contribution`.`receipt_date` at row 1]