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
toeknee6mo ago
Can you provide the stack trace?
DariusIII
DariusIII6mo ago
Give me a sec, will share on flare
toeknee
toeknee6mo ago
@Dan Harrin can you check this out? Possible cause is by your Route Clustering prep work for V3.2?
DariusIII
DariusIII6mo ago
Flare
Route [filament.management.pages.management-dashboard] not defined. - The error occurred at http://127.0.0.1/management
DariusIII
DariusIII6mo 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 Harrin6mo 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
DariusIII6mo ago
Sure, let me do it
Dan Harrin
Dan Harrin6mo 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
DariusIII6mo ago
Uninstalled and removed from panels, still the same error
Dan Harrin
Dan Harrin6mo ago
please share the new flare url and check the route:list for me
DariusIII
DariusIII6mo ago
management/management_dashboard ........................................................... filament.management.management-dashboard › App\Filament\Pages\ManagementDashboard
Dan Harrin
Dan Harrin6mo ago
is this a standard filament page? are you registering the route anywhere manually?
DariusIII
DariusIII6mo ago
I have custom page with routes function
Dan Harrin
Dan Harrin6mo ago
gotcha
DariusIII
DariusIII6mo 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 Harrin6mo 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
DariusIII6mo ago
Great I use multiple panels, without overrides they would not work
Dan Harrin
Dan Harrin6mo ago
you should not need to override routes to use multiple panels
DariusIII
DariusIII6mo 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 Harrin6mo ago
have you set $routePath as per the docs on the dashboard?
DariusIII
DariusIII6mo ago
ermm....no? Can you point me to the exact path on docs page? As i might have missed it
DariusIII
DariusIII6mo 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 Harrin6mo ago
in 2 mins, v3.1.38 will be available. updating should fix the original issue
DariusIII
DariusIII6mo ago
Thank you!