A panel has been registered without an `id()`.

Hello, everyone. I have this AdminPanelProivder
<?php
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
- >viteTheme('resources/css/filament/admin/theme.css')
->plugins([
SpotlightPlugin::make(),
FilamentMediaLibrary::make()->conversionResponsive(false)
->conversionMedium(false)
->conversionSmall(false),
ThemesPlugin::make(),
FilamentFullCalendarPlugin::make()
->selectable(true)
->editable(true)
->config([
'validRange' => ['start' => Carbon::now()->toDateString()],
'eventOverlap' => false
]),
])
->default()
->id('admin')
->path('admin')
->login(Login::class)
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
->pages([
Pages\Dashboard::class,
])
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
->widgets([
Widgets\AccountWidget::class,
Widgets\FilamentInfoWidget::class,
])
->colors([
'danger' => Color::Rose,
'gray' => Color::Gray,
'info' => Color::Blue,
'primary' => Color::Indigo,
'success' => Color::Emerald,
'warning' => Color::Orange,
])
->authMiddleware([
Authenticate::class,
]);
}
}
<?php
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
- >viteTheme('resources/css/filament/admin/theme.css')
->plugins([
SpotlightPlugin::make(),
FilamentMediaLibrary::make()->conversionResponsive(false)
->conversionMedium(false)
->conversionSmall(false),
ThemesPlugin::make(),
FilamentFullCalendarPlugin::make()
->selectable(true)
->editable(true)
->config([
'validRange' => ['start' => Carbon::now()->toDateString()],
'eventOverlap' => false
]),
])
->default()
->id('admin')
->path('admin')
->login(Login::class)
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
->pages([
Pages\Dashboard::class,
])
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
->widgets([
Widgets\AccountWidget::class,
Widgets\FilamentInfoWidget::class,
])
->colors([
'danger' => Color::Rose,
'gray' => Color::Gray,
'info' => Color::Blue,
'primary' => Color::Indigo,
'success' => Color::Emerald,
'warning' => Color::Orange,
])
->authMiddleware([
Authenticate::class,
]);
}
}
Everything seems to be alright, but I'm still receiving the error 'A panel has been registered without an id().
Solution:
I received the same error after updating filament. I fixed it by moving plugins below id, so in your case, something like this should work: ```php <?php class AdminPanelProvider extends PanelProvider {...
Jump to solution
2 Replies
Solution
nowak
nowak10mo ago
I received the same error after updating filament. I fixed it by moving plugins below id, so in your case, something like this should work:
<?php
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
- >viteTheme('resources/css/filament/admin/theme.css')
->default()
->id('admin')
->path('admin')
->plugins([
SpotlightPlugin::make(),
FilamentMediaLibrary::make()->conversionResponsive(false)
->conversionMedium(false)
->conversionSmall(false),
ThemesPlugin::make(),
FilamentFullCalendarPlugin::make()
->selectable(true)
->editable(true)
->config([
'validRange' => ['start' => Carbon::now()->toDateString()],
'eventOverlap' => false
]),
])
->login(Login::class)
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
->pages([
Pages\Dashboard::class,
])
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
->widgets([
Widgets\AccountWidget::class,
Widgets\FilamentInfoWidget::class,
])
->colors([
'danger' => Color::Rose,
'gray' => Color::Gray,
'info' => Color::Blue,
'primary' => Color::Indigo,
'success' => Color::Emerald,
'warning' => Color::Orange,
])
->authMiddleware([
Authenticate::class,
]);
}
}
<?php
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
- >viteTheme('resources/css/filament/admin/theme.css')
->default()
->id('admin')
->path('admin')
->plugins([
SpotlightPlugin::make(),
FilamentMediaLibrary::make()->conversionResponsive(false)
->conversionMedium(false)
->conversionSmall(false),
ThemesPlugin::make(),
FilamentFullCalendarPlugin::make()
->selectable(true)
->editable(true)
->config([
'validRange' => ['start' => Carbon::now()->toDateString()],
'eventOverlap' => false
]),
])
->login(Login::class)
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
->pages([
Pages\Dashboard::class,
])
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
->widgets([
Widgets\AccountWidget::class,
Widgets\FilamentInfoWidget::class,
])
->colors([
'danger' => Color::Rose,
'gray' => Color::Gray,
'info' => Color::Blue,
'primary' => Color::Indigo,
'success' => Color::Emerald,
'warning' => Color::Orange,
])
->authMiddleware([
Authenticate::class,
]);
}
}
I do not use a viteTheme, this might need moving too.
DianaMujoiu
DianaMujoiuOP10mo ago
Oh, thank you, is working now 🙏🏻
Want results from more Discord servers?
Add your server