Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.6.6, 4.6.7
-
Fix Version/s: 4.6.9
-
Component/s: CiviContribute, CiviEvent
-
Labels:None
-
Documentation Required?:None
-
Funding Source:Contributed Code
Description
Steps to reproduce (tested on d46.demo.civicrm.org):
- Enable Tax and Invoicing and "Automatically email invoice when user purchases online" in CiviContribute component settings
- Create an unpaid Event with online registration and confirmation email enabled
- Attempt to register for the Event
Expected result is to create a Participant for the Event and for it to send them a confirmation email with event details; in practice, this creates the Participant but then produces the terrifying yellow screen with "DB Error: Syntax Error" - which allows end users to to refresh and submit multiple event registrations.
Cause is CRM_Event_BAO_Event attempting to attach an invoice PDF to the confirmation email when there is no contribution.
Patch attached (for 4.6.6) that fixes the issue by checking for a contributionId value.