Server Error 500 on Vendor and Client Creation

Hi, just logged in to my instance after setting it up a few weeks ago. I am planning to run a migration from my current system to InvoiceNinja before the start of new tax year. However when testing it again with some recent data, I encounter server error 500 when trying to create clients or vendors. I can create Expenses or Invoices without the error.

Running 5.8.9 self hosted via Softaculous.

image

Logs show this error:
**[2024-01-15 23:12:01] production.ERROR: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘language_id’ in ‘field list’ (Connection: mysql, SQL: insert into vendors (company_id, user_id, name, website, private_notes, public_notes, country_id, is_deleted, vendor_hash, address1, address2, city, state, postal_code, language_id, phone, number, vat_number, id_number, currency_id, custom_value1, custom_value2, custom_value3, custom_value4, classification, assigned_user_id, updated_at, created_at) values (1, 1, CircleLoop, ?, ?, ?, ?, 0, jaVI11E6QvqBN57XIbUwrJtEdARyqzNL6yOjdupX, ?, ?, ?, ?, ?, 20, ?, ?, ?, ?, 2, ?, ?, ?, ?, ?, 1, 2024-01-15 23:12:01.657161, 2024-01-15 23:12:01.657161)) {“userId”:1,“exception”:"[object] (Illuminate\Database\QueryException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘language_id’ in ‘field list’ (Connection: mysql, SQL: insert into vendors (company_id, user_id, name, website, private_notes, public_notes, country_id, is_deleted, vendor_hash, address1, address2, city, state, postal_code, language_id, phone, number, vat_number, id_number, currency_id, custom_value1, custom_value2, custom_value3, custom_value4, classification, assigned_user_id, updated_at, created_at) values (1, 1, CircleLoop, ?, ?, ?, ?, 0, jaVI11E6QvqBN57XIbUwrJtEdARyqzNL6yOjdupX, ?, ?, ?, ?, ?, 20, ?, ?, ?, ?, 2, ?, ?, ?, ?, ?, 1, 2024-01-15 23:12:01.657161, 2024-01-15 23:12:01.657161))

I get it that it’s missing the column in the table, but how did that happen? UI has a field that is being inserted while the DB didn’t get that update? How can I fix that without reinstalling?

Kept digging and searching posts on the forum. Found this: 500 Error log shows Column not found: 1054 Unknown column 'classification' in 'field list' - #22 by tonyyeb

I tried running the migration on my host but was getting:

So I knew I was on the right track. Checking my PHP settings, the missing function wasn’t listed, but then cPanel seems to have a ‘disabled_functions’ setting on the second tab of PHP options. escapeshellarg was listed there, so removed it a re-run the migration.

All good now, and can create Vendors and Clients.

Glad to hear it, thanks for the update!

1 Like