Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-21771: error when viewing event registration with linked contribu… #11707

Merged
merged 1 commit into from
Feb 22, 2018

Conversation

jitendrapurohit
Copy link
Contributor

@jitendrapurohit jitendrapurohit commented Feb 22, 2018

…tion

Overview

Fix fatal error on View Event Registration Page.

Before

Fees section displays fatal error when the event page is viewed.

image

After

Fees section loads correctly with participant payment details.

Comments

Added unit test.


@yashodha
Copy link
Contributor

@jitendrapurohit
Copy link
Contributor Author

Hmm, the only reason I can think of why it is not replicating on the demo is the participant id would also exist as a contribution in the database.

For eg: in the above case, there would be a contribution existing in the DB with id = 51 which is actually a participant id. This makes the code bypass the getsingle API exception and returns the function without errors.

If you look at the unit test, I've considered $this->_participantID4 in order to assert the function correctly. If the participant id is replaced by $this->_participantID - the unit test passes without any errors.

So, to replicate this, the participant we are creating should have the id not present in civicrm_contribution table.

@yashodha
Copy link
Contributor

@jitendrapurohit yes, can confirm that it works.

@yashodha
Copy link
Contributor

looks good to merge

@yashodha yashodha merged commit b512c92 into civicrm:master Feb 22, 2018
@jitendrapurohit jitendrapurohit deleted the CRM-21771 branch February 22, 2018 11:18
@mlutfy mlutfy added this to the 4.7.32 milestone Mar 6, 2018
@magnolia61
Copy link
Contributor

didnt this make it into 4.7.31 as a last minute fatal error preventor?

@seamuslee001
Copy link
Contributor

@magnolia61 Richard it was just merged into 4.7.31 just now this PR was against master

@magnolia61
Copy link
Contributor

Thank you Seamus!

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

Successfully merging this pull request may close these issues.

5 participants