Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.2.8
-
Fix Version/s: 4.3.0
-
Component/s: CiviContribute
-
Labels:
Description
Version: CiviCRM 4.2.8/Drupal 6
Symptom: the emailed receipts for recurring contributions contains links to update contribution amounts and billing details. When followed, those links load information for the wrong recurring subscription. In fact, they always load the information for the chronologically first subscription in the db (a hint to the cause).
Location of the problem: in CRM/Contribution/BAO/ContributionRecur.php, the function getSubscriptionDetails(), which attempts to match subscriptions against a contribution ID, is finding multiple matches, one for every subscription in the civicrm_contribution_recur table. It returns the first one, instead of the correct one.
The fix:
Lines 393--399 currently are:
Code: [Select]
elseif ($entity == 'contribution')
Should be (note addition to INNER JOIN):
Code: [Select]
elseif ($entity == 'contribution')
I have verified on our own installation that this change fixes the problem.
A diff is attached.