Answers.Body: <p>I feel its related to to <a href="https://issues.civicrm.org/jira/browse/CRM-21721" rel="nofollow noreferrer">CRM-21721</a>. Can you please try after apply the <a href="https://github.com/civicrm/civicrm-core/pull/11601" rel="nofollow noreferrer">patch</a>?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-08T20:17:37.860Z
Answers.Text: My guess it that over 50% of SE users would have no idea of how to apply a patch. I am not sure how to suggest making the above a more user friendly answer since it is the correct one most likely. I wonder if there is a link to 'how to apply a patch' that could be added. I see that is fixed for 4.7.31 so that is quite a wait for them. Hmm
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-08T20:39:46.797Z
Answers.Text: You're right. I'm new to civi and have no idea how to apply a patch.
Answers.UserDisplayName: kzburn
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-09T01:16:18.517Z
Answers.Text: The essence of it is that some lines of code need to be changed in one of the files. There are smart ways of doing this, but since this looks quite straightforward it involves removing the line marked with a '-' and adding the lines marked with a '+' in this documentation - https://github.com/civicrm/civicrm-core/pull/11601/files - but to do so means accessing your civicrm files which may also be too big a step.
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-09T14:53:51.577Z
Answers.Text: And, this change did not fix my problem. I still get the 'Failed to update contribution in database' error.
Answers.UserDisplayName: kzburn
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-14T12:26:49.520Z
Answers.Text: Can anyone help with this problem? How do I track down the real problem? Users can register for events without any problems. They just can't 'contribute' by making a donation or signing up for membership.
Answers.UserDisplayName: kzburn
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-10T04:06:25.173Z
Answers.Text: The patch above (& a bunch of other fixes) are in 5.0 which is released now - you might try that
Answers.UserDisplayName: user4278
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-08T20:05:46.687Z
Answers.LastActivityDate: 2018-02-08T20:05:46.687Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>Someone makes an online contribution, the payment goes through, but an error pops up on the screen saying 'Failed to update contribution in database'. If I look at contributions, the status for the contribution is 'Pending (Incomplete transaction)'. The error occurs from a call to completeTransaction() in Confirm.php.</p>
  
  <p>I turned on debugging and got a traceback, but it doesn't tell me any more than I have typed here. How can I find out <em>why</em> the update to the database is failing?</p>
  
Tags: <civicontribute>
Title: Civicontribution 'Failed to update contribution in database'
ThreadText: # Civicontribution 'Failed to update contribution in database'
  
  (Asked by: username_0 on 2018-02-08)
  
  Someone makes an online contribution, the payment goes through, but an error pops up on the screen saying 'Failed to update contribution in database'. If I look at contributions, the status for the contribution is 'Pending (Incomplete transaction)'. The error occurs from a call to completeTransaction() in Confirm.php.
  
  I turned on debugging and got a traceback, but it doesn't tell me any more than I have typed here. How can I find out *why* the update to the database is failing?
  
  **Tags:** civicontribute
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-02-08. Score: 0
  
  I feel its related to to [CRM-21721](https://issues.civicrm.org/jira/browse/CRM-21721). Can you please try after apply the [patch](https://github.com/civicrm/civicrm-core/pull/11601)?
  
  > **Comments:**
  > **username_2**: My guess it that over 50% of SE users would have no idea of how to apply a patch. I am not sure how to suggest making the above a more user friendly answer since it is the correct one most likely. I wonder if there is a link to 'how to apply a patch' that could be added. I see that is fixed for 4.7.31 so that is quite a wait for them. Hmm  
  > **username_0**: You're right. I'm new to civi and have no idea how to apply a patch.  
  > **username_2**: The essence of it is that some lines of code need to be changed in one of the files. There are smart ways of doing this, but since this looks quite straightforward it involves removing the line marked with a '-' and adding the lines marked with a '+' in this documentation - https://github.com/civicrm/civicrm-core/pull/11601/files - but to do so means accessing your civicrm files which may also be too big a step.  
  > **username_0**: And, this change did not fix my problem. I still get the 'Failed to update contribution in database' error.  
  > **username_0**: Can anyone help with this problem? How do I track down the real problem? Users can register for events without any problems. They just can't 'contribute' by making a donation or signing up for membership.  
  > **username_3**: The patch above (& a bunch of other fixes) are in 5.0 which is released now - you might try that  
  
  ---
  
  