Skip to content
This repository has been archived by the owner on Jul 20, 2022. It is now read-only.

Print Invoice from contribution view, return DB DB Error: constraint violation #113

Open
mathavanveda opened this issue Mar 28, 2018 · 0 comments

Comments

@mathavanveda
Copy link
Contributor

Description :
When Printing Invoice from Contribution View page return DB constraint error. because print pdf functionality is also call CRM_Core_BAO_MessageTemplate::sendTemplate() to build html.
so we cannot expect $params['toEmail'] in this case, which cause DB Constraint error while creating Mailing queue in mte.php (line 564).

Tested in Civi Version 4.7.23 & 4.7.29

To Reproduce error:

Settings :
1) Enable Mandrill SMTP
2) Used for Transactional Emails

Make Sure Civi invoicing has been enabled in civicrm setting.
Enable invoicing
Menu > Administer > civicontribute >> CiviContribute Component setting
select Enable Tax and Invoicing tab checkbox. which will enable print invoice button on contribution view page.

Steps:

  1. Navigate to Contribution Tab on contact summary.
  2. Click View
  3. Click Print Invoice

which return DB Error. (attached Screenshot)

mandril - print pdf error

Attached a PR for this issue #112

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant