Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7.30
-
Fix Version/s: 5.0.0
-
Component/s: CiviContribute, CiviEvent
-
Labels:
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Contributed Code
-
Verified?:No
Description
I'm seeing an error when viewing an event registration that has a payment attached to it:
"Expected one Contribution but found 0"
The error is traced to this change:
https://github.com/civicrm/civicrm-core/commit/c0406a917d985381d6a0452598a1c291573391a8#diff-7a5b0e2d131dabc49178460fc63328c0L4107
The $id is used to retrieve the contribution, and it should be $contributionId. In the context, $id could be the membership_payment, participant_payment, or the contribution id. We set the $contributionId depending on the context and that should be used to retrieve the contrib details.
Eileen McNaughton can you take a look – that PR was yours.