RouteNotFoundException on 3.1.37

I have updated from 3.1.36 to 3.1.37 and instantly started getting the exception. Rolling back to .36 and everything works as before. Does anyone else have this issue?
25 Replies
toeknee
toeknee11mo ago
Can you provide the stack trace?
DariusIII
DariusIIIOP11mo ago
Give me a sec, will share on flare
toeknee
toeknee11mo ago
@Dan Harrin can you check this out? Possible cause is by your Route Clustering prep work for V3.2?
DariusIII
DariusIIIOP11mo ago
Flare
Route [filament.management.pages.management-dashboard] not defined. - The error occurred at http://127.0.0.1/management
DariusIII
DariusIIIOP11mo ago
This crossed my mind, as that is the only thing that is related to routes Whatever route i have, none works cleared route cache too
Dan Harrin
Dan Harrin11mo ago
i have tested those changes on a few apps and havent seen anything i will check the stack trace can you try uninstalling the spotlight plugin? the error is originating from there
DariusIII
DariusIIIOP11mo ago
Sure, let me do it
Dan Harrin
Dan Harrin11mo ago
and to help me, please check route:list. what is the route name of management-dashboard? it should be filament.management.pages.management-dashboard probably
DariusIII
DariusIIIOP11mo ago
Uninstalled and removed from panels, still the same error
Dan Harrin
Dan Harrin11mo ago
please share the new flare url and check the route:list for me
DariusIII
DariusIIIOP11mo ago
management/management_dashboard ........................................................... filament.management.management-dashboard › App\Filament\Pages\ManagementDashboard
Dan Harrin
Dan Harrin11mo ago
is this a standard filament page? are you registering the route anywhere manually?
DariusIII
DariusIIIOP11mo ago
I have custom page with routes function
Dan Harrin
Dan Harrin11mo ago
gotcha
DariusIII
DariusIIIOP11mo ago
public static function routes(Panel $panel): void
{
Route::get('management_dashboard', static::class)
->middleware(static::getRouteMiddleware($panel))
->name(static::getSlug());
}
public static function routes(Panel $panel): void
{
Route::get('management_dashboard', static::class)
->middleware(static::getRouteMiddleware($panel))
->name(static::getSlug());
}
Dan Harrin
Dan Harrin11mo ago
thats the problem then we removed the pages. prefix from the routes file, and moved it into the routes() method on normal pages but overriding that would cause issues, yes let me see if i can work around it on my end
DariusIII
DariusIIIOP11mo ago
Great I use multiple panels, without overrides they would not work
Dan Harrin
Dan Harrin11mo ago
you should not need to override routes to use multiple panels
DariusIII
DariusIIIOP11mo ago
I know i have 3 panels, and only the main dashboard does not work when overrides are removed i banged my head around it, but only the route override made it work
public static function routes(Panel $panel): void
{
Route::get('dashboard', static::class)
->middleware(static::getRouteMiddleware($panel))
->name(static::getSlug());
}
public static function routes(Panel $panel): void
{
Route::get('dashboard', static::class)
->middleware(static::getRouteMiddleware($panel))
->name(static::getSlug());
}
This is the issue for the specific dashboard: GET|HEAD dashboard .................................................................................................. filament.admin.user-dashboard It should be only dashboard, not user-dashboard But i could never make it work
return $panel
->default(false)
->id('admin')
->path('dashboard')
->login(Login::class)
->profile()
->colors([
'primary' => Color::Amber,
'secondary' => Color::Gray,
])
->passwordReset()
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
->pages([
Dashboard::class,
])
return $panel
->default(false)
->id('admin')
->path('dashboard')
->login(Login::class)
->profile()
->colors([
'primary' => Color::Amber,
'secondary' => Color::Gray,
])
->passwordReset()
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
->pages([
Dashboard::class,
])
Dan Harrin
Dan Harrin11mo ago
have you set $routePath as per the docs on the dashboard?
DariusIII
DariusIIIOP11mo ago
ermm....no? Can you point me to the exact path on docs page? As i might have missed it
DariusIII
DariusIIIOP11mo ago
Ok, i found it I am not sure it was there when i started with v3, but i might have missed it, though Added the $routePath now and it started working Let me just confirm it Yeah with added $routePath and removal of overrides it works spotlight plugin is not an issue
Dan Harrin
Dan Harrin11mo ago
in 2 mins, v3.1.38 will be available. updating should fix the original issue
DariusIII
DariusIIIOP11mo ago
Thank you!
Want results from more Discord servers?
Add your server