contributeMode value incorrectly set or interpreted for emailed receipts
in the file CRM/Contribute/BAO/Contribution.php, line 2554, we have:
if ($this->_relatedObjects['paymentProcessor']['billing_mode'] & CRM_Core_Payment::BILLING_MODE_FORM) {
//direct mode showing billing block, so use directIPN for temporary
$template->assign('contributeMode', 'directIPN');
}
In other words, the contributeMode value is hacked when using direct mode (also known as "form" mode I think?).
This means that when we get to the email receipt template, smarty thinks that the contributor will definitely have management of their own recurring contribution and therefore prints out the relevant self-management links, although for direct mode these links will be likely invalid.
Which means receipts are bad out of the box for any recurring contribution using a token-based/civicrm-managed schedule.
I would note that the links provided in the receipt would only work for logged in users, so I'd lean towards not including those links by default. At least, I feel they should be configurable on a site-wide basis to better support CiviCRM installs that do not provide logins to donors by default.
Solutions could include either or both of:
- Fixing that hack (no idea who put it in or what the implications are).
- Provide a site-wide configuration to exclude self-service links in receipts.