error creating Consumable
Expected Behavior (or desired behavior if a feature request)
When I add consumables and click save it should add it
Actual Behavior
When I add a consumable and click save I get a error Error: Please check the form below for errors
But no actual error appears as all the files are filled out. This occurred after a upgrade from 2.1.0 to 2.1.2
Please confirm you have done the following before posting your bug report:
- [ ] I have enabled debug mode
- [ ] I have read checked the Common Issues page
Debug info
select * fromuserswhereusers.deleted_atis null andusers.id= '3' limit 11.25ms select * fromthrottlewhereuser_id= '3' limit 1830μs selectgroups.*,users_groups.user_idaspivot_user_id,users_groups.group_idaspivot_group_idfromgroupsinner joinusers_groupsongroups.id=users_groups.group_idwhereusers_groups.user_id= '3'840μs selectname,idfromcategorieswherecategory_type= 'consumable' anddeleted_atis null order bynameasc870μs selectname,idfromcompaniesorder bynameasc580μs selectname,idfromlocationswherelocations.deleted_atis null order bynameasc980μs select * fromsettingswheresettings.id= '1' limit 11.31ms select * fromsettingslimit 11ms select * fromthrottlewhereuser_id= '3' limit 1760μs select * fromthrottlewhereuser_id= '3' limit 1670μs select * fromthrottlewhereuser_id= '3' limit 1840μs select * fromthrottlewhereuser_id= '3' limit 1710μs
Please provide answers to these questions before posting your bug report:
- Version of Snipe-IT you're running 2.1.2
- What OS and web server you're running Snipe-IT on CentOS Linux release 7.2.1511 (Core)
- What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) install.sh
- If you're getting an error in your browser, include that error Error: Please check the form below for errors
- What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error
- If a stacktrace is provided in the error, include that too.
- Any errors that appear in your browser's error console.
- Confirm whether the error is reproduceable on the demo.
- Include any additional information you can find in
app/storage/logsand your webserver's logs. - Include what you've done so far in the installation, and if you got any error messages along the way.
- Indicate whether or not you've manually edited any data directly in the database no
Yo, got the same problem - but only if u set the user in a company... After deactivating the multiple company support and remove the user from companies as well, no error message appears... @snipe maybe a bug while creating the tables in database - once there are a column missing in "consumables_users"... kindly find the last log after my last error message.
cheers, cris
Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'company_id' in 'where clause' (SQL: select * from consumables_users where company_id = 1 and consumables_users.consumable_id in (4) order by created_at desc)' in /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php:625
Stack trace:
#0 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php(581): Illuminate\Database\Connection->runQueryCallback('select * from ...', Array, Object(Closure)) #1 /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php(304): Illuminate\Database\Connection->run('select * from...', Array, Object(Closure))
Did you run a php artisan migrate when updating? I think the db changed some between versions.