-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crashing looking for asset #807
Comments
This is why I don't recommend importing directly into the database. This is a relational database system, and the relationships are required for things to function. When you manually import data, you skip those relationships, and things break. Can you show me what's on line 1063 of |
return $assets->model->name; |
Yeah, so it's looking for the name of the model that's associated with the asset, but I'm guessing you don't have any in your CSV. You can try creating an asset model and then updating the DB's |
I created the models in the database and assigned them to their respective numbers in my csv. I found the culprit, forgot to enter in the model id on my last row in my CSV. after i deleted that record, everything started working. When you talked about how you dont recommend importing this way, do you think that the database will be stable now after it starts getting manipulated? I just dont have time to manually enter in 170 assets into this database from the GUI..... |
(Edit: striking this through so you don't do it, since it looks like you resolved the problem) |
Yeah, it should be stable. As long as the assets table is complete, it should be fine. |
Having another bizarre issue, when I click a user that is assigned to an asset under the various assets list i get a 503 error and this error is generated [2015-05-20 23:18:42] production.ERROR: exception 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException' in C:\xampp\htdocs\snipeit\vendor\laravel\framework\src\Illuminate\Routing\RouteCollection.php:148 what is weird is that if i go to the users section and i click on the same user, there is no issue. The URL it redirects me to is the same in both instances too..... Sorry to be such a pain :( |
Can you show me both URLs? (You can obscure your hostname for privacy if it's not on an internet network) |
just double checked, they arent the same but they do refer to the same number Working URL: http://localhost/snipeit/public/admin/users/87/view Broken URL: http://localhost/snipeit/admin/users/87/view |
The URLs are not the same. Notice the |
Looks like maybe you forgot to set your |
Ah, wait, are you running this in a subdirectory? |
I mean, you're obviously running it in a sub-directory. What I'm really asking is whether you intend to be or not. Is |
This is the directory to the snipeit root C:\xampp\htdocs\snipeit |
Can you answer my question above? Trying to determine what your intent was so I can help you get the document root stuff sorted out. |
It kind of happened by mistake? I have little experience with Apache.... |
Okay, so is your intent to run it at http://localhost? Meaning there's nothing else on this server? |
I also access PHPMyAdmin by going to http://localhost/phpmyadmin/ but that's it.... |
Okay, so you want to set your |
What's happening is that When you change the I don't remember if XAMPP lets you create multiple hosts easily, but if it does, you may want to create a new entry for snipe-it, so it doesn't make you lose access to your phpMyAdmin. This tutorial should help: http://ailoo.net/2008/07/set-up-multiple-virtual-hosts-on-xampp-for-windows/ |
Just tried to install the latest snipe-it (e455b2a) on a linux server, but without setting
The missing 1%
to
essentially removing the leading This may be a bug, since leading Can somebody please check if the |
This is fixed on 2.0 |
@ivokabadshow If you have access to the apache config, why not run it in a subdomain instead? That way you can set up the document root appropriately, etc. |
Thanks for the fix. I do have access to the apache config, but not to additional subdomains due to company regulations. If you find the time you should add the setup to the documentation. It seems many people try to use it without a separate subdomain. |
Added subdirectories to the docs: http://docs.snipeitapp.com/installation/subdirectory.html |
I did a mass import of 170 assets into the asset table using a csv within PHPMyAdmin but Snipe IT seems to be crashing on one or more of the assets. How can I tell which one it is referring to? Below is the error log:
[2015-05-20 22:41:32] production.ERROR: exception 'ErrorException' with message 'Trying to get property of non-object' in C:\xampp\htdocs\snipeit\app\controllers\admin\AssetsController.php:1063
Stack trace:
#0 C:\xampp\htdocs\snipeit\app\controllers\admin\AssetsController.php(1063): Illuminate\Exception\Handler->handleError(8, 'Trying to get p...', 'C:\xampp\htdocs...', 1063, Array)
#1 [internal function]: Controllers\Admin\AssetsController->Controllers\Admin{closure}(Object(Asset))
#2 C:\xampp\htdocs\snipeit\vendor\chumper\datatable\src\Chumper\Datatable\Columns\FunctionColumn.php(15): call_user_func(Object(Closure), Object(Asset))
#3 C:\xampp\htdocs\snipeit\vendor\chumper\datatable\src\Chumper\Datatable\Engines\CollectionEngine.php(264): Chumper\Datatable\Columns\FunctionColumn->run(Object(Asset))
#4 [internal function]: Chumper\Datatable\Engines\CollectionEngine->Chumper\Datatable\Engines{closure}(Object(Asset), 89)
#5 C:\xampp\htdocs\snipeit\vendor\laravel\framework\src\Illuminate\Support\Collection.php(344): array_map(Object(Closure), Array, Array)
#6 C:\xampp\htdocs\snipeit\vendor\chumper\datatable\src\Chumper\Datatable\Engines\CollectionEngine.php(270): Illuminate\Support\Collection->map(Object(Closure))
#7 C:\xampp\htdocs\snipeit\vendor\chumper\datatable\src\Chumper\Datatable\Engines\CollectionEngine.php(123): Chumper\Datatable\Engines\CollectionEngine->compileArray(Object(Illuminate\Support\Collection))
#8 C:\xampp\htdocs\snipeit\vendor\chumper\datatable\src\Chumper\Datatable\Engines\BaseEngine.php(225): Chumper\Datatable\Engines\CollectionEngine->internalMake(Object(Illuminate\Support\Collection), Array)
#9 C:\xampp\htdocs\snipeit\app\controllers\admin\AssetsController.php(1106): Chumper\Datatable\Engines\BaseEngine->make()
#10 [internal function]: Controllers\Admin\AssetsController->getDatatable('Deployed')
#11 C:\xampp\htdocs\snipeit\vendor\laravel\framework\src\Illuminate\Routing\Controller.php(231): call_user_func_array(Array, Array)
#12 C:\xampp\htdocs\snipeit\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php(93): Illuminate\Routing\Controller->callAction('getDatatable', Array)
#13 C:\xampp\htdocs\snipeit\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php(62): Illuminate\Routing\ControllerDispatcher->call(Object(Controllers\Admin\AssetsController), Object(Illuminate\Routing\Route), 'getDatatable')
#14 C:\xampp\htdocs\snipeit\vendor\laravel\framework\src\Illuminate\Routing\Router.php(967): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'Controllers\Adm...', 'getDatatable')
#15 [internal function]: Illuminate\Routing\Router->Illuminate\Routing{closure}('Deployed')
#16 C:\xampp\htdocs\snipeit\vendor\laravel\framework\src\Illuminate\Routing\Route.php(109): call_user_func_array(Object(Closure), Array)
#17 C:\xampp\htdocs\snipeit\vendor\laravel\framework\src\Illuminate\Routing\Router.php(1033): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#18 C:\xampp\htdocs\snipeit\vendor\laravel\framework\src\Illuminate\Routing\Router.php(1001): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#19 C:\xampp\htdocs\snipeit\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(775): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#20 C:\xampp\htdocs\snipeit\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(745): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
#21 C:\xampp\htdocs\snipeit\vendor\barryvdh\laravel-debugbar\src\Middleware\Stack.php(34): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#22 C:\xampp\htdocs\snipeit\vendor\laravel\framework\src\Illuminate\Session\Middleware.php(72): Barryvdh\Debugbar\Middleware\Stack->handle(Object(Illuminate\Http\Request), 1, true)
#23 C:\xampp\htdocs\snipeit\vendor\laravel\framework\src\Illuminate\Cookie\Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#24 C:\xampp\htdocs\snipeit\vendor\laravel\framework\src\Illuminate\Cookie\Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#25 C:\xampp\htdocs\snipeit\vendor\stack\builder\src\Stack\StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#26 C:\xampp\htdocs\snipeit\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(641): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#27 C:\xampp\htdocs\snipeit\public\index.php(49): Illuminate\Foundation\Application->run()
#28 {main} [] []
The text was updated successfully, but these errors were encountered: