I’m a paid self-hosted user and the installation is on a WHM/cPanel server. After upgrading from 3.9.2 to 4.0.1 using the Softaculous upgrader I’m no longer able to see any Payments. Clients, Products, Invoices, Quotes, etc all work fine. When I try to change the option in the Status field I get the error:
DataTables warning: table id=DataTables_Table_0 - Ajax error. For more information about this error, please see http://datatables.net/tn/7
In Chrome’s dev console I see:
jquery.js:9664 GET https://mydomain.com/inv/public/api/payments?sEcho=6&iColumns=10&sColumns=%2C%2C%2C%2C%2C%2C%2C%2C%2C&iDisplayStart=0&iDisplayLength=10&mDataProp_0=0&sSearch_0=&bRegex_0=false&bSearchable_0=true&bSortable_0=false&mDataProp_1=1&sSearch_1=&bRegex_1=false&bSearchable_1=true&bSortable_1=true&mDataProp_2=2&sSearch_2=&bRegex_2=false&bSearchable_2=true&bSortable_2=true&mDataProp_3=3&sSearch_3=&bRegex_3=false&bSearchable_3=true&bSortable_3=true&mDataProp_4=4&sSearch_4=&bRegex_4=false&bSearchable_4=true&bSortable_4=true&mDataProp_5=5&sSearch_5=&bRegex_5=false&bSearchable_5=true&bSortable_5=true&mDataProp_6=6&sSearch_6=&bRegex_6=false&bSearchable_6=true&bSortable_6=true&mDataProp_7=7&sSearch_7=&bRegex_7=false&bSearchable_7=true&bSortable_7=true&mDataProp_8=8&sSearch_8=&bRegex_8=false&bSearchable_8=true&bSortable_8=true&mDataProp_9=9&sSearch_9=&bRegex_9=false&bSearchable_9=true&bSortable_9=false&sSearch=&bRegex=false&iSortCol_0=7&sSortDir_0=desc&iSortingCols=1&_=1515610092307 500 (Internal Server Error) send @ jquery.js:9664 ajax @ jquery.js:9215 H @ jquery.dataTables.js:2483 j @ jquery.dataTables.js:2515 I @ jquery.dataTables.js:1982 P @ jquery.dataTables.js:2101 Ne @ jquery.dataTables.js:7347 (anonymous) @ jquery.dataTables.js:7421 iterator @ jquery.dataTables.js:6827 (anonymous) @ jquery.dataTables.js:7420 (anonymous) @ jquery.dataTables.js:6990 refreshDatatable_payments @ payments:895 (anonymous) @ payments:1168 u @ jquery.js:3148 fireWith @ jquery.js:3260 n @ jquery.js:9314 e @ jquery.js:9718 XMLHttpRequest.send (async) send @ jquery.js:9664 ajax @ jquery.js:9215 ot.(anonymous function) @ jquery.js:9361 (anonymous) @ payments:1167 dispatch @ jquery.js:4670 m.handle @ jquery.js:4338 trigger @ jquery.js:4579 (anonymous) @ jquery.js:5289 each @ jquery.js:384 each @ jquery.js:136 trigger @ jquery.js:5288 i.select @ select2.js:3060 (anonymous) @ select2.js:3131 i.invoke @ select2.js:637 i.trigger @ select2.js:627 r.trigger @ select2.js:5472 (anonymous) @ select2.js:5298 i.invoke @ select2.js:637 i.trigger @ select2.js:631 (anonymous) @ select2.js:1210 dispatch @ jquery.js:4670 m.handle @ jquery.js:4338 jquery.js:9664 GET https://mydomain.com/set_entity_filter/payment 404 (Not Found)
Note that my installation is at https://mydomain.com/inv but the last jquery error seems to be trying to call https://mydomain.com/set_entity_filter with no /inv/. Not sure if that’s the cause here.
And in laravel-error.log I see:
[2018-01-10 18:52:14] production.ERROR: ***Illuminate\Database\QueryException*** [42S22] : /home/mydomain/public_html/inv/vendor/laravel/framework/src/Illuminate/Database/Connection.php [Line 770] => SQLSTATE[42S22]: Column not found: 1054 Unknown column 'payments.exchange_rate' in 'field list' (SQL: selectpayments
.public_id
, COALESCE(clients.currency_id, accounts.currency_id) currency_id, COALESCE(clients.country_id, accounts.country_id) country_id,payments
.transaction_reference
, COALESCE(NULLIF(clients.name,''), NULLIF(CONCAT(contacts.first_name, ' ', contacts.last_name),''), NULLIF(contacts.email,'')) client_name,clients
.public_id
asclient_public_id
,clients
.user_id
asclient_user_id
,payments
.amount
, CONCAT(payments.payment_date, payments.created_at) as date,payments
.payment_date
,payments
.payment_status_id
,payments
.payment_type_id
,payments
.payment_type_id
assource
,invoices
.public_id
asinvoice_public_id
,invoices
.user_id
asinvoice_user_id
,invoices
.invoice_number
,invoices
.invoice_number
asinvoice_name
,contacts
.first_name
,contacts
.last_name
,contacts
.payment_types
.name
asmethod
,payment_types
.name
aspayment_type
,payments
.account_gateway_id
,payments
.deleted_at
,payments
.is_deleted
,payments
.user_id
,payments
.refunded
,payments
.expiration
,payments
.last4
,payments
.payments
.routing_number
,payments
.bank_name
,payments
.private_notes
,payments
.exchange_rate
,payments
.exchange_currency_id
,invoices
.is_deleted
asinvoice_is_deleted
,gateways
.name
asgateway_name
,gateways
.id
asgateway_id
,payment_statuses
.name
asstatus
frompayments
inner joinaccounts
onaccounts
.id
=payments
.account_id
inner joinclients
onclients
.id
=payments
.client_id
inner joininvoices
oninvoices
.id
=payments
.invoice_id
inner joincontacts
oncontacts
.client_id
=clients
.id
inner joinpayment_statuses
onpayment_statuses
.id
=payments
.payment_status_id
left joinpayment_types
onpayment_types
.id
=payments
.payment_type_id
left joinaccount_gateways
onaccount_gateways
.id
=payments
.account_gateway_id
left joingateways
ongateways
.id
=account_gateways
.gateway_id
wherepayments
.account_id
= 1 andcontacts
.is_primary
= 1 andcontacts
.deleted_at
is null andinvoices
.is_deleted
= 0 and (payments
.id
is null or (payments
.deleted_at
is not null andpayments
.is_deleted
= 0)) andclients
.deleted_at
is null order bydate
desc limit 10) {"context":"PHP","user_id":1,"account_id":1,"user_name":"My Name","method":"GET","url":"https://mydomain.com/inv/public/api/payments","previous":"https://mydomain.com/inv/public/payments","user_agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36","ip":"MY IP ADDR","count":28,"is_console":"no","is_api":"no","db_server":"mysql"} []
Any help is appreciated.