The new registration is not listed then in Civi, the participant is not registered, nor the payment that he did, although the payment was already done (which creates a lot of problems with refunds and explanations).

2 Answers
2

A feature added since 4.7.18 is the ability to store the type of credit card used during a credit card transaction. So a new field card_type_id was created to store that data.

Your copy of the database doesn't have this field.

I think the most likely explanation is that you upgraded CiviCRM's file system without visiting the page that upgrades the database. From your backtrace, I can see you're running Drupal; please try visiting http://<your_drupal_home>/civicrm/upgrade?reset=1 (reference: Drupal upgrade instructions step 11).

The second possibility is that there's a bug in the upgrade script that prevented this field from being added - but this is the first I've heard of someone having this problem. Please try to run the upgrade script again and see if it resolves your issue.

I did upgrade the database when I updated the file system, and my civicrm_financial_trxn table has the column 'card_type_id', with all null's and default value null as well. The weird thing is that the failed query doesn't even have this column in it. So I thought maybe in one of the triggers, but the only one for the insert is just inserting into the log table the old value of that column. Should not throw any exception.
– EladAug 13 '17 at 16:42

OK, found it. For some reason the log table log_civicrm_financial_trxn did not have the card_type_id column, therefore the trigger that tried to log any action on the table threw an exception.
Once I added the column manually to the log table, the problem was solved.