Search not working in Asset view
Hello, Ran into an odd issue after upgrading to 2.1.1, if we were looking at All Assets or Deployed Assets, typing in the search field worked as expected.
After the upgrade nothing happens when you use the search field. Oddly enough, it does work in any other area, reports, asset models etc..
Now when you type anything in the search field and hit enter, nothing happens.
I'm running: Snipe-IT version v2.1.1-55-g701c16f OS - Ubuntu 14.04.4 with Apache 2.4.7 PHP Version 5.5.9-1ubuntu4.14 Laravel Version 4.2.17 Install method was CLI installer We get no error on the web page, however in chrome, the console shows a 500 (internal server error) https://server.domain.local/api/hardware/list?&search=steve&sort=asset_tag&order=desc&limit=1000&offset=0 500 (Internal Server Error)
The error is not reproducible in the demo
app/storage/logs shows this exception -
Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'snipeit_owner_point_of_contact' in 'where clause' (SQL: select count() as aggregate from assets where assets.deleted_at is null and physical = 1 and ((select count() from models where assets.model_id = models.id and (select count() from categories where models.category_id = categories.id and (categories.name LIKE %steve% or models.name LIKE %steve%) and categories.deleted_at is null) >= 1) >= 1 or ((select count() from status_labels where assets.status_id = status_labels.id and status_labels.name LIKE %steve% and status_labels.deleted_at is null) >= 1) or ((select count() from companies where assets.company_id = companies.id and companies.name LIKE %steve%) >= 1) or ((select count() from locations where assets.rtd_location_id = locations.id and locations.name LIKE %steve% and locations.deleted_at is null) >= 1) or ((select count() from users where assets.assigned_to = users.id and (users.first_name LIKE %steve% or users.last_name LIKE %steve% or ((select count(_) from locations where users.location_id = locations.id and locations.name LIKE %steve%) >= 1))) >= 1) or assets.name LIKE %steve% or asset_tag LIKE %steve% or serial LIKE %steve% or order_number LIKE %steve% or notes LIKE %steve or _snipeit_mac_address LIKE %steve% or _snipeit_owner_point_of_contact LIKE %steve%) order by asset_tag desc)' in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php:625
No error messages during upgrade.
No data has been manually edited.
Thanks,
Please provide us with the information requested at the Getting Help documentation: http://docs.snipeitapp.com/getting-help.html
Try hitting "Backspace" a few times at the search field first before typing.
I added a custom field and it looks like the column name is different then what is in the database. I'm thinking that might be what's causing the issue.
Can you show me the contents of your custom_fields table?
(Also the structure of your assets table)