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?


I feel its related to to CRM-21721. Can you please try after apply the patch?

  • 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 – petednz - fuzion Feb 8 '18 at 20:17
  • You're right. I'm new to civi and have no idea how to apply a patch. – kzburn Feb 8 '18 at 20:39
  • 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 - 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. – petednz - fuzion Feb 9 '18 at 1:16
  • And, this change did not fix my problem. I still get the 'Failed to update contribution in database' error. – kzburn Feb 9 '18 at 14:53
  • 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. – kzburn Feb 14 '18 at 12:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.