Open jayavman opened 1 year ago
@jayavman I am not able to reproduce this bug. I of course am on the latest version. If there is more I need to know to reproduce this error please share, or I'd recommend updating to the latest version as well.
Same - this looks like there's probably a 500 happening, so we'd need to see logs - and 9 times out of 10, it's because migrations were not run. If you run php artisan migrate
what do you see?
Hi, @snipe & @Godmartinz
@server asset]$ php artisan migrate
Application In Production! *
Do you really wish to run this command? (yes/no) [no]:
yes
Nothing to migrate.
Here is the logs :
[2023-02-18 14:02:33] production.ERROR: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'users.first_name' in 'where clause' (SQL: select count() as aggregate from downer_assetaction_logs
where (downer_assetaction_logs
.action_type
LIKE %R% or downer_assetaction_logs
.note
LIKE %R% or downer_assetaction_logs
.log_meta
LIKE %R% or downer_assetaction_logs
.user_id
LIKE %R% or exists (select from downer_assetcompanies
where downer_assetaction_logs
.company_id
= downer_assetcompanies
.id
and downer_assetcompanies
.name
LIKE %R%) or exists (select from downer_assetusers
where downer_assetaction_logs
.user_id
= downer_assetusers
.id
and (downer_assetusers
.first_name
LIKE %R% or downer_assetusers
.last_name
LIKE %R% or downer_assetusers
.username
LIKE %R% or downer_assetusers
.email
LIKE %R%)) or exists (select from downer_assetusers
where downer_assetaction_logs
.target_id
= downer_assetusers
.id
and (downer_assetusers
.first_name
LIKE %R% or downer_assetusers
.last_name
LIKE %R% or downer_assetusers
.username
LIKE %R% or downer_assetusers
.email
LIKE %R% or CONCAT (users.first_name, " ", users.last_name) LIKE %R%)) or exists (select from downer_assetassets
where downer_assetaction_logs
.item_id
= downer_assetassets
.id
and (downer_assetassets
.asset_tag
LIKE %R% or downer_assetassets
.name
LIKE %R%) and downer_assetassets
.deleted_at
is null)) and downer_assetaction_logs
.deleted_at
is null) {"userId":4,"exception":"[object] (Illuminate\Database\QueryException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'users.first_name' in 'where clause' (SQL: select count() as aggregate from downer_assetaction_logs
where (downer_assetaction_logs
.action_type
LIKE %R% or downer_assetaction_logs
.note
LIKE %R% or downer_assetaction_logs
.log_meta
LIKE %R% or downer_assetaction_logs
.user_id
LIKE %R% or exists (select from downer_assetcompanies
where downer_assetaction_logs
.company_id
= downer_assetcompanies
.id
and downer_assetcompanies
.name
LIKE %R%) or exists (select from downer_assetusers
where downer_assetaction_logs
.user_id
= downer_assetusers
.id
and (downer_assetusers
.first_name
LIKE %R% or downer_assetusers
.last_name
LIKE %R% or downer_assetusers
.username
LIKE %R% or downer_assetusers
.email
LIKE %R%)) or exists (select from downer_assetusers
where downer_assetaction_logs
.target_id
= downer_assetusers
.id
and (downer_assetusers
.first_name
LIKE %R% or downer_assetusers
.last_name
LIKE %R% or downer_assetusers
.username
LIKE %R% or downer_assetusers
.email
LIKE %R% or CONCAT (users.first_name, \" \", users.last_name) LIKE %R%)) or exists (select from downer_assetassets
where downer_assetaction_logs
.item_id
= downer_assetassets
.id
and (downer_assetassets
.asset_tag
LIKE %R% or downer_assetassets
.name
LIKE %R%) and downer_assetassets
.deleted_at
is null)) and downer_assetaction_logs
.deleted_at
is null) at /home/fredons/public_html/asset/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712)
[stacktrace]
[previous exception] [object] (PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'users.first_name' in 'where clause' at /home/fredons/public_html/asset/vendor/laravel/framework/src/Illuminate/Database/Connection.php:368) [stacktrace]
"} [2023-03-15 09:14:31] production.ERROR: Error: Call to undefined method Closure::__set_state() in /home/fredons/public_html/asset/bootstrap/cache/config.php:928 Stack trace:
Next LogicException: Your configuration files are not serializable. in /home/fredons/public_html/asset/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php:71 Stack trace:
[2023-03-15 09:14:31] production.ERROR: Your configuration files are not serializable. {"exception":"[object] (LogicException(code: 0): Your configuration files are not serializable. at /home/fredons/public_html/asset/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php:71) [stacktrace]
[previous exception] [object] (Error(code: 0): Call to undefined method Closure::__set_state() at /home/fredons/public_html/asset/bootstrap/cache/config.php:928) [stacktrace]
"} [2023-03-21 09:59:14] production.ERROR: Error: Call to undefined method Closure::__set_state() in /home/fredons/public_html/asset/bootstrap/cache/config.php:928 Stack trace:
Next LogicException: Your configuration files are not serializable. in /home/fredons/public_html/asset/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php:71 Stack trace:
[2023-03-21 09:59:14] production.ERROR: Your configuration files are not serializable. {"exception":"[object] (LogicException(code: 0): Your configuration files are not serializable. at /home/fredons/public_html/asset/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php:71) [stacktrace]
[previous exception] [object] (Error(code: 0): Call to undefined method Closure::__set_state() at /home/fredons/public_html/asset/bootstrap/cache/config.php:928) [stacktrace]
"} [2023-03-21 12:37:23] production.ERROR: Error: Call to undefined method Closure::__set_state() in /home/fredons/public_html/asset/bootstrap/cache/config.php:928 Stack trace:
Next LogicException: Your configuration files are not serializable. in /home/fredons/public_html/asset/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php:71 Stack trace:
[2023-03-21 12:37:23] production.ERROR: Your configuration files are not serializable. {"exception":"[object] (LogicException(code: 0): Your configuration files are not serializable. at /home/fredons/public_html/asset/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php:71) [stacktrace]
[previous exception] [object] (Error(code: 0): Call to undefined method Closure::__set_state() at /home/fredons/public_html/asset/bootstrap/cache/config.php:928) [stacktrace]
"} [2023-03-21 12:58:57] production.ERROR: Error: Call to undefined method Closure::__set_state() in /home/fredons/public_html/asset/bootstrap/cache/config.php:928 Stack trace:
Next LogicException: Your configuration files are not serializable. in /home/fredons/public_html/asset/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php:71 Stack trace:
[2023-03-21 12:58:57] production.ERROR: Your configuration files are not serializable. {"exception":"[object] (LogicException(code: 0): Your configuration files are not serializable. at /home/fredons/public_html/asset/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php:71) [stacktrace]
[previous exception] [object] (Error(code: 0): Call to undefined method Closure::__set_state() at /home/fredons/public_html/asset/bootstrap/cache/config.php:928) [stacktrace]
"}
You’re using table prefixes, which we don’t see that often - but we also try to do prefix safe queries. We’ll take a poke around.
Is it possible something changed with your table names or your .env? Are your tables actually prefixed?
This is the line I find interesting:
https://github.com/snipe/snipe-it/issues/9 /home/fredons/public_html/asset/app/Http/Controllers/Api/ReportsController.php(61): Illuminate\Database\Eloquent\Builder->__call('count', Array)
What do you see in your version of /home/fredons/public_html/asset/app/Http/Controllers/Api/ReportsController.php
, line 61?
If you run the upgrade.php
script, what's the output?
Is your feature request related to a problem? Please describe.
Currently when you click on Manufacturer, Click on the name of one of the manufacturer lists it takes you to this page
The list at the top says eg. it has 2 assets under that manufacturer but doesnt show you which assets they are.
Describe the solution you'd like
It should list every asset that relates to that manufacturer instead of just a number at the top of the page. have a list of assets related to the Manufacturer.
Describe alternatives you've considered
No response
Additional context
No response