3.9.2 Update and Document Sort Error

Recently updated to 3.9.2 from 3.8.1 and noticed that the Documents Section in the client portal is giving up database errors.

All browsers are giving the error when attempting to sort the Documents section in the client portal via “Document Date” or “Size” and the documents section was missing all documents till I hit the sort by “Name” bar for each respective client.

Browser error when hitting sort by “Document Date” or “Size”:

DataTables warning: table id=DataTables_Table_0 - Ajax error. For more information about this error, please see http://datatables.net/tn/7

Laravel-error.log entry to go along with that chrome browser error

production.ERROR: Illuminate\Database\QueryException [42S22] : /ninja/vendor/laravel/framework/src/Illuminate/Database/Connection.php [Line 729] => SQLSTATE[42S22]: Column not found: 1054 Unknown column 'document_date' in 'order clause'

Any ideas? I’ve checked permissions and they are in good shape, this is the only issue I’m finding with the new update.

Thanks.

I’m able to replicate the problem, we’ll include a fix with our next major release.

Great, thank you for the swift response as always. I’ll keep an eye on GitHub in case the manual fix is released there before the next major release.

Thanks.

This change should fix it, thanks again for catching the problem!

https://github.com/invoiceninja/invoiceninja/commit/fd118f8f82c4e1f400227657104d21824dc5e81a