Skip to content
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

Deleting Assets Doesn't Check-In Licenses #2207

Closed
2 tasks done
veen1981 opened this issue Jun 28, 2016 · 3 comments
Closed
2 tasks done

Deleting Assets Doesn't Check-In Licenses #2207

veen1981 opened this issue Jun 28, 2016 · 3 comments
Labels
✋ bug Confirmed bug stale

Comments

@veen1981
Copy link

Expected Behavior (or desired behavior if a feature request)

We had to delete and re-import a bunch of assets with incorrect information. Part of this process involved using the the purge function in version 3. Everything was working fine after re-importing the assets until I realized that there were licenses assigned to a couple of the devices that were deleted and purged. Now when clicking on those specific licenses, I am receiving the "Whoops, Looks like something went wrong" page. I am able to clone the license to get things working, but am now unable to delete the licenses as they are still showing that the license is checked out to a device. When deleting assets, licenses assigned to those assets should be checked-in, either automagically, or there should be a prompt displaying something like "This asset cannot be deleted, please check-in any licenses or components assigned and try again."


Actual Behavior

Deleting assets with licenses assigned will break the license. I have attached the log file for this error.


Please confirm you have done the following before posting your bug report:


Please provide answers to these questions before posting your bug report:

Next ErrorException: Trying to get property of non-object (View: /var/www/html/snipeit/resources/views/licenses/view.blade.php) in /var/www/html/snipeit/storage/framework/views/b0f401a4106892749760d8b8d56e6ebe58493d71.php:71
Stack trace:
#0 /var/www/html/snipeit/bootstrap/cache/compiled.php(15134): Illuminate\View\Engines\CompilerEngine->handleViewException(Object(ErrorException), 1)
#1 /var/www/html/snipeit/bootstrap/cache/compiled.php(15169): Illuminate\View\Engines\PhpEngine->evaluatePath('/var/www/html/s...', Array)
#2 /var/www/html/snipeit/bootstrap/cache/compiled.php(15001): Illuminate\View\Engines\CompilerEngine->get('/var/www/html/s...', Array)
#3 /var/www/html/snipeit/bootstrap/cache/compiled.php(14989): Illuminate\View\View->getContents()
#4 /var/www/html/snipeit/bootstrap/cache/compiled.php(14973): Illuminate\View\View->renderContents()
#5 /var/www/html/snipeit/bootstrap/cache/compiled.php(16210): Illuminate\View\View->render()
#6 /var/www/html/snipeit/bootstrap/cache/compiled.php(15711): Illuminate\Http\Response->setContent(Object(Illuminate\View\View))
#7 /var/www/html/snipeit/bootstrap/cache/compiled.php(8308): Symfony\Component\HttpFoundation\Response->__construct(Object(Illuminate\View\View))
#8 /var/www/html/snipeit/bootstrap/cache/compiled.php(9403): Illuminate\Routing\Router->prepareResponse(Object(Illuminate\Http\Request), Object(Illuminate\View\View))
#9 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#10 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#11 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#12 /var/www/html/snipeit/bootstrap/cache/compiled.php(9880): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#13 /var/www/html/snipeit/bootstrap/cache/compiled.php(9404): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#14 /var/www/html/snipeit/bootstrap/cache/compiled.php(9391): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(App\Http\Controllers\LicensesController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'getView')
#15 /var/www/html/snipeit/bootstrap/cache/compiled.php(8459): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'App\Http\Contro...', 'getView')
#16 /var/www/html/snipeit/bootstrap/cache/compiled.php(8446): Illuminate\Routing\Route->runController(Object(Illuminate\Http\Request))
#17 /var/www/html/snipeit/bootstrap/cache/compiled.php(8160): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#18 [internal function]: Illuminate\Routing\Router->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#19 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#20 /var/www/html/snipeit/app/Http/Middleware/CheckPermissions.php(27): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#21 [internal function]: App\Http\Middleware\CheckPermissions->handle(Object(Illuminate\Http\Request), Object(Closure), 'licenses.view')
#22 /var/www/html/snipeit/bootstrap/cache/compiled.php(9895): call_user_func_array(Array, Array)
#23 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#24 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#25 /var/www/html/snipeit/app/Http/Middleware/Authenticate.php(45): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#26 [internal function]: App\Http\Middleware\Authenticate->handle(Object(Illuminate\Http\Request), Object(Closure))
#27 /var/www/html/snipeit/bootstrap/cache/compiled.php(9895): call_user_func_array(Array, Array)
#28 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#29 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#30 /var/www/html/snipeit/app/Http/Middleware/CheckLocale.php(40): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#31 [internal function]: App\Http\Middleware\CheckLocale->handle(Object(Illuminate\Http\Request), Object(Closure))
#32 /var/www/html/snipeit/bootstrap/cache/compiled.php(9895): call_user_func_array(Array, Array)
#33 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#34 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#35 /var/www/html/snipeit/bootstrap/cache/compiled.php(3189): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#36 [internal function]: Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#37 /var/www/html/snipeit/bootstrap/cache/compiled.php(9895): call_user_func_array(Array, Array)
#38 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#39 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#40 /var/www/html/snipeit/bootstrap/cache/compiled.php(13073): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#41 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#42 /var/www/html/snipeit/bootstrap/cache/compiled.php(9895): call_user_func_array(Array, Array)
#43 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#44 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#45 /var/www/html/snipeit/bootstrap/cache/compiled.php(13010): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#46 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#47 /var/www/html/snipeit/bootstrap/cache/compiled.php(9895): call_user_func_array(Array, Array)
#48 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#49 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#50 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#51 /var/www/html/snipeit/bootstrap/cache/compiled.php(9880): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#52 /var/www/html/snipeit/bootstrap/cache/compiled.php(8161): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#53 /var/www/html/snipeit/bootstrap/cache/compiled.php(8152): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#54 /var/www/html/snipeit/bootstrap/cache/compiled.php(8142): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#55 /var/www/html/snipeit/bootstrap/cache/compiled.php(2400): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#56 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http{closure}(Object(Illuminate\Http\Request))
#57 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#58 /var/www/html/snipeit/vendor/fideloper/proxy/src/TrustProxies.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#59 [internal function]: Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
#60 /var/www/html/snipeit/bootstrap/cache/compiled.php(9895): call_user_func_array(Array, Array)
#61 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#62 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#63 /var/www/html/snipeit/app/Http/Middleware/CheckForSetup.php(22): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#64 [internal function]: App\Http\Middleware\CheckForSetup->handle(Object(Illuminate\Http\Request), Object(Closure))
#65 /var/www/html/snipeit/bootstrap/cache/compiled.php(9895): call_user_func_array(Array, Array)
#66 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#67 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#68 /var/www/html/snipeit/app/Http/Middleware/NosniffGuard.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#69 [internal function]: App\Http\Middleware\NosniffGuard->handle(Object(Illuminate\Http\Request), Object(Closure))
#70 /var/www/html/snipeit/bootstrap/cache/compiled.php(9895): call_user_func_array(Array, Array)
#71 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#72 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#73 /var/www/html/snipeit/app/Http/Middleware/XssProtectHeader.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#74 [internal function]: App\Http\Middleware\XssProtectHeader->handle(Object(Illuminate\Http\Request), Object(Closure))
#75 /var/www/html/snipeit/bootstrap/cache/compiled.php(9895): call_user_func_array(Array, Array)
#76 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#77 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#78 /var/www/html/snipeit/app/Http/Middleware/FrameGuard.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#79 [internal function]: App\Http\Middleware\FrameGuard->handle(Object(Illuminate\Http\Request), Object(Closure))
#80 /var/www/html/snipeit/bootstrap/cache/compiled.php(9895): call_user_func_array(Array, Array)
#81 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#82 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#83 /var/www/html/snipeit/bootstrap/cache/compiled.php(13334): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#84 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#85 /var/www/html/snipeit/bootstrap/cache/compiled.php(9895): call_user_func_array(Array, Array)
#86 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#87 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#88 /var/www/html/snipeit/bootstrap/cache/compiled.php(11880): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#89 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#90 /var/www/html/snipeit/bootstrap/cache/compiled.php(9895): call_user_func_array(Array, Array)
#91 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#92 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#93 /var/www/html/snipeit/bootstrap/cache/compiled.php(3250): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#94 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#95 /var/www/html/snipeit/bootstrap/cache/compiled.php(9895): call_user_func_array(Array, Array)
#96 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#97 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#98 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#99 /var/www/html/snipeit/bootstrap/cache/compiled.php(9880): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#100 /var/www/html/snipeit/bootstrap/cache/compiled.php(2347): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#101 /var/www/html/snipeit/bootstrap/cache/compiled.php(2331): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#102 /var/www/html/snipeit/public/index.php(54): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#103 {main}

`

  • 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
@snipe snipe added the ✋ bug Confirmed bug label Jun 28, 2016
@veen1981
Copy link
Author

@snipe Do you have any suggestions on how to repair the issue from where I am at now? Will this require me manually deleting these licenses from the database or is there a safer way to get around this?

@veen1981
Copy link
Author

Update: I replicated my server setup on a VM and tested manually deleting the 4 affected licenses by id number. After doing so, nothing appears to be broken.

@stale
Copy link

stale bot commented Jan 21, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions!

@stale stale bot added the stale label Jan 21, 2018
@stale stale bot closed this as completed Jan 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✋ bug Confirmed bug stale
Projects
None yet
Development

No branches or pull requests

2 participants