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-21465 - avoid fatal error when clicking through pledge email. #11305

Merged
merged 1 commit into from
Dec 12, 2017

Conversation

jmcclelland
Copy link
Contributor

@jmcclelland jmcclelland commented Nov 21, 2017

Overview

When setting up a pledge, an email message is sent with a link you can use to make a contribution against your pledge. When you click on this link, you get a backtrace.

Before

When clicking on the pledge link, you get a back trace.

After

When clicking on the link, you get a form to fill in your contribution amount.

Technical Details

This is a start - if I'm not missing anything obvious I can add a test. But for now, it seems that calling CRM_Core_DAO::commonRetrieveAll against a table with returnProperties set to a field that is not in the table shouldn't wor.


@eileenmcnaughton
Copy link
Contributor

@jmcclelland I feel like it would make the code more readable if we used the api rather than that retrieveAll function - which most people are less familiar with.

However, the main thing that is confusing me is why this error is not hit outside of this (ie. the pledge block can be on the normal contribution page can't it).

I do think wrapping a test around this function would rock!

@mlutfy
Copy link
Member

mlutfy commented Nov 21, 2017

@Edzelopez Could you review this PR? It seems like that line was added in dccd9f4

@twomice
Copy link
Contributor

twomice commented Dec 12, 2017

I can confirm this fixes the issue described in CRM-21465 and makes pledge payments possible again.

@eileenmcnaughton eileenmcnaughton merged commit 3bb2efa into civicrm:master Dec 12, 2017
@eileenmcnaughton
Copy link
Contributor

merging based on @twomice review. @Edzelopez / @monishdeb FYI - a fatal seems like an important reason to merge - you can revisit the reason for adding

abdohz added a commit to abdohz/civicrm-core that referenced this pull request Dec 13, 2017
sluc23 pushed a commit to ixiam/civicrm-core that referenced this pull request Jan 10, 2018
CRM-21465 - avoid fatal error when clicking through pledge email.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants