Closed andylord56 closed 8 years ago
I'm not sure I'm totally understanding the issue. Your example is a different page so I just want to make sure I am following along correctly. Is it that the links are going to a shortened URL? aka link goes to: http://localhost/tickets link expected to go to: http://localhost/testticket/public/tickets
?
yes that is correct
i have just been debugging myself and changed to something along the lines of this:
<a href="{{ url('tickets/status') }}">{{ trans('ticketit::admin.nav-statuses') }}</a>
instead of
<a href="/{{ $setting->grab('admin_route') }}/status">{{ trans('ticketit::admin.nav-statuses') }}</a>
fixes the link issue however i now get:
ErrorException in TicketsController.php line 210: Trying to get property of non-object
on that page i think due to the settings of the getting the page
Version 1 or .2?
.2 full laravel error
ErrorException in TicketsController.php line 210:
Trying to get property of non-object
in TicketsController.php line 210
at HandleExceptions->handleError('8', 'Trying to get property of non-object', 'C:\wamp\www\testticket\vendor\kordy\ticketit\src\Controllers\TicketsController.php', '210', array('id' => 'priority', 'ticket' => null, 'status_lists' => object(Collection), 'priority_lists' => object(Collection), 'category_lists' => object(Collection), 'close_perm' => 'yes', 'reopen_perm' => 'yes')) in TicketsController.php line 210
at TicketsController->show('priority')
at call_user_func_array(array(object(TicketsController), 'show'), array('tickets' => 'priority')) in Controller.php line 76
at Controller->callAction('show', array('tickets' => 'priority')) in ControllerDispatcher.php line 146
at ControllerDispatcher->call(object(TicketsController), object(Route), 'show') in ControllerDispatcher.php line 94
at ControllerDispatcher->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in ResAccessMiddleware.php line 22
at ResAccessMiddleware->handle(object(Request), object(Closure))
at call_user_func_array(array(object(ResAccessMiddleware), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in ControllerDispatcher.php line 96
at ControllerDispatcher->callWithinStack(object(TicketsController), object(Route), object(Request), 'show') in ControllerDispatcher.php line 54
at ControllerDispatcher->dispatch(object(Route), object(Request), 'Kordy\Ticketit\Controllers\TicketsController', 'show') in Route.php line 174
at Route->runController(object(Request)) in Route.php line 140
at Route->run(object(Request)) in Router.php line 703
at Router->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Authenticate.php line 28
at Authenticate->handle(object(Request), object(Closure))
at call_user_func_array(array(object(Authenticate), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in VerifyCsrfToken.php line 64
at VerifyCsrfToken->handle(object(Request), object(Closure))
at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in StartSession.php line 62
at StartSession->handle(object(Request), object(Closure))
at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in EncryptCookies.php line 59
at EncryptCookies->handle(object(Request), object(Closure))
at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in Router.php line 705
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 678
at Router->dispatchToRoute(object(Request)) in Router.php line 654
at Router->dispatch(object(Request)) in Kernel.php line 246
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Debugbar.php line 49
at Debugbar->handle(object(Request), object(Closure))
at call_user_func_array(array(object(Debugbar), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 44
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in Kernel.php line 132
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 99
at Kernel->handle(object(Request)) in index.php line 54
Have you gone to the settings and set a priority and status?
i cant get in there to set any
also tryed this: php artisan db:seed --class="Kordy\Ticketit\Seeds\TicketitTableSeeder" and i get the same error as above in the terminal
Just to be clear. What page are you attempting to open when you get that error?
so far the pages i have tested are: http://localhost/testticket/public/tickets/status http://localhost/testticket/public/tickets/priority Both are doing this it seems
http://localhost/testticket/public/tickets/create? works so i dont think its a side wide thing
however in creating a ticket i dont see any tickets in the table but a 1 is displayed in the menu
the pages should be: http://localhost/testticket/public/tickets-admin/priority http://localhost/testticket/public/tickets-admin/status
Are you logged in as the site admin or an agent?
tickets-admin
ah yes that fixes the problem
Logged in as site admin
Thanks
However i am unable to see tickets in the /tickets route
sorry not sure how to do pull requests on here but for those interested in how i fixed the links:
<div class="panel panel-default">
<div class="panel-body">
<ul class="nav nav-pills">
<li role="presentation" class="{!! Request::is($setting->grab('main_route')) ? "active" : "" !!}">
<a href="{{ url('/tickets' )}}">{{ trans('ticketit::lang.nav-active-tickets') }}
<span class="badge">
{{ Kordy\Ticketit\Models\Ticket::active()->agentUserTickets($u->id)->count() }}
</span>
</a>
</li>
<li role="presentation" class="{!! Request::is($setting->grab('main_route').'/complete') ? "active" : "" !!}">
<a href="{{ url('tickets/complete') }}">{{ trans('ticketit::lang.nav-completed-tickets') }}
<span class="badge">
{{ Kordy\Ticketit\Models\Ticket::complete()->agentUserTickets($u->id)->count() }}
</span>
</a>
</li>
@if($u->isAdmin())
<li role="presentation" class="{!! Request::is($setting->grab('admin_route')) || Request::is($setting->grab('admin_route').'/indicator*') ? "active" : "" !!}">
<a href="{{ url('/tickets-admin' )}}">{{ trans('ticketit::admin.nav-dashboard') }}</a>
</li>
<li role="presentation" class="dropdown {!!
Request::is($setting->grab('admin_route')."/status*") ||
Request::is($setting->grab('admin_route')."/priority*") ||
Request::is($setting->grab('admin_route')."/agent*") ||
Request::is($setting->grab('admin_route')."/category*") ||
Request::is($setting->grab('admin_route')."/administrator*")
? "active" : "" !!}">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
{{ trans('ticketit::admin.nav-settings') }} <span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li role="presentation" class="{!! Request::is($setting->grab('admin_route')."/status*") ? "active" : "" !!}">
<a href="{{ url('tickets-admin/status') }}">{{ trans('ticketit::admin.nav-statuses') }}</a>
</li>
<li role="presentation" class="{!! Request::is($setting->grab('admin_route')."/priority*") ? "active" : "" !!}">
<a href="{{ url('tickets-admin/priority') }}">{{ trans('ticketit::admin.nav-priorities') }}</a>
</li>
<li role="presentation" class="{!! Request::is($setting->grab('admin_route')."/agent*") ? "active" : "" !!}">
<a href="{{ url('tickets-admin//agent') }}">{{ trans('ticketit::admin.nav-agents') }}</a>
</li>
<li role="presentation" class="{!! Request::is($setting->grab('admin_route')."/category*") ? "active" : "" !!}">
<a href="{{ url('tickets-admin/category') }}">{{ trans('ticketit::admin.nav-categories') }}</a>
</li>
<li role="presentation" class="{!! Request::is($setting->grab('admin_route')."/config*") ? "active" : "" !!}">
<a href="{{ url('tickets-admin/configuration') }}">{{ trans('ticketit::admin.nav-configuration') }}</a>
</li>
<li role="presentation" class="{!! Request::is($setting->grab('admin_route')."/administrator*") ? "active" : "" !!}">
<a href="{{ url('tickets-admin/administrator') }}">{{ trans('ticketit::admin.nav-administrator') }}</a>
</li>
</ul>
</li>
@endif
</ul>
</div>
</div>
my layout is as follows:
<head>
<title>My website - @yield('page')</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}" />
<link href="/salescrm/public/{{ elixir('css/all.css') }}" rel="stylesheet">
<link href="/salescrm/public/{{ elixir('css/app.css') }}" rel="stylesheet">
<link rel="stylesheet" href="{{ url('/build/css/datatables.bootstrap.css') }}">
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
</head>
<body>
<body id="app-layout">
<nav class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<!-- Collapsed Hamburger -->
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#app-navbar-collapse">
<span class="sr-only">Toggle Navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- Branding Image -->
<a class="navbar-brand" href="{{ url('/') }}">
Sales CRM
</a>
</div>
<div class="collapse navbar-collapse" id="app-navbar-collapse">
<!-- Left Side Of Navbar -->
<ul class="nav navbar-nav">
<li><a href="{{ url('/home') }}">Home</a></li>
<li><a href="{{ url('/sales') }}">Sales</a></li>
<li><a href="{{ url('/mysales') }}">My Sales</a></li>
</ul>
<!-- Right Side Of Navbar -->
<ul class="nav navbar-nav navbar-right">
<!-- Authentication Links -->
@if (Auth::guest())
<li><a href="{{ url('/login') }}">Login</a></li>
<!--<li><a href="{{ url('/register') }}">Register</a></li>-->
@else
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
{{ Auth::user()->name }} <span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li><a href="superadmin/templates"><i class="glyphicon glyphicon-cog"></i> Super Admin</a><li>
<li><a href="{{ url('/changepass') }}"><i class="fa fa-btn fa-refresh"></i>Change Password</a></li>
<li><a href="{{ url('/logout') }}"><i class="fa fa-btn fa-sign-out"></i>Logout</a></li>
</ul>
</li>
@endif
</ul>
</div>
</div>
</nav>
<div class="container-fluid">
@if (Session::has('flash_notification.message'))
<div class="alert alert-{{ Session::get('flash_notification.level') }}">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
{{ Session::get('flash_notification.message') }}
</div>
@endif
@yield('extra')
</div>
<div class="container">
@yield('content')
</div>
<script src="{{ url('/js/jquery.min.js')}}"></script>
@yield('footer')
</body>
<!-- JavaScripts -->
<script src="//code.jquery.com/jquery.js"></script>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="{{ url('/js/all.js') }}"></script>
<script src="{{ url('/js/handlebars.js') }}"></script>
<!-- jQuery -->
<script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
<style>
td.details-control {
background: url('build/images/details_open.png') no-repeat center center;
cursor: pointer;
}
tr.details td.details-control {
background: url('build/images/details_close.png') no-repeat center center;
}
</style>
<!-- DataTables -->
<script src="//cdn.datatables.net/1.10.7/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/salescrm/public/js/numeric-comma.js"></script>
<!-- Bootstrap JavaScript -->
<script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script>
$('.dropdown-toggle').dropdown()
</script>
<script type="text/javascript">
$(function() {
$( "#datepicker" ).datepicker({
changeMonth: true,
changeYear: true
});
});
</script>
<script>
$('#flash-overlay-modal').modal();
</script>
@stack('scripts')
</body>
</html>
yield footer is in place
ok so i figured it out jquery was erroring because of where it was fixed now thanks
Locally i have this setup and the link is:
http://localhost/testticket/public/tickets/
to get this to work i had to change view instal index.blade.php line 28 to this: