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

Fix payment hangs when registering a user for a paid event without recording payment #12914

Merged
merged 1 commit into from
Oct 9, 2018

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Payment hangs when registering a user for a paid event without recording payment

Before

  1. Go to a contact record
    
  2. Click to the "Events" tab
    
  3. Click add event registration
    
  4. Select an event that takes payment, for example: "UKSG One-Day Conference: London"
    
  5. Set a participant role to anything
    
  6. Uncheck the "Record payment?" checkbox
    
  7. Save
    
  8. It'll hang forever, but actually create the registration. (To retest with the same contact and event, you'll have to refresh their contact page, go to the events tab, and delete the registration)
    

After

  1. Go to a contact record
    
  2. Click to the "Events" tab
    
  3. Click add event registration
    
  4. Select an event that takes payment, for example: "UKSG One-Day Conference: London"
    
  5. Set a participant role to anything
    
  6. Uncheck the "Record payment?" checkbox
    
  7. Save
    
  8. The event is saved and you can see your created event
    

Technical Details

The issue was due to a lack of validation in getDetails function when contributionIDs param is empty

Comments

This is an alternative to #12888
I wasn't actually able to reproduce the issue but this solution, proposed by
Monish, seems safe & sensible

…cording payment

This is an alternative to civicrm#12888
I wasn't actually able to reproduce the issue but this solution, proposed by
Monish, seems safe & sensible
@civibot
Copy link

civibot bot commented Oct 9, 2018

(Standard links)

@civibot civibot bot added the master label Oct 9, 2018
@@ -326,7 +329,6 @@ public static function &getDetails($contributionIDs) {
$dao = CRM_Core_DAO::executeQuery($query,
CRM_Core_DAO::$_nullArray
);
$rows = array();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

defined exactly the same 2 lines earlier

@monishdeb
Copy link
Member

Happy with the final change. Tested again working fine.

@eileenmcnaughton
Copy link
Contributor Author

merging - fails are unrelated

@eileenmcnaughton eileenmcnaughton merged commit fb11db5 into civicrm:master Oct 9, 2018
@eileenmcnaughton eileenmcnaughton deleted the record branch October 9, 2018 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants