Plugin [awcodes/curator] is not registered for panel [admin]

Hi, After some issues with stancl/tenancy and fileupload (which I resolved by removing the stancl package), I've got file upload working, and decided to play with awcode's curator plugin. However, I'm getting the above error (which I don't think is a curator issue). I have two panels: control and admin. I'm trying to use the plugin only in the control one, which has config as follows:
$plugins = [
\BezhanSalleh\FilamentShield\FilamentShieldPlugin::make(),
\Awcodes\Curator\CuratorPlugin::make()
];

$panel
->id("control")
->path("/control")
->brandName("Control")
->login()
->emailVerification()
->passwordReset()
->colors($colors)
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverPages(in: app_path('Filament/Pages/Mandatory'), for: 'App\\Filament\\Pages\\Mandatory')
->pages($pages)
->plugins($plugins)
->databaseNotifications()
->resources($resources)
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
->widgets($widgets)
->middleware($middleware)
->authMiddleware($authMiddleware)
->navigationGroups([
'Content',
'Billing',
'Filament Shield',
]);
$plugins = [
\BezhanSalleh\FilamentShield\FilamentShieldPlugin::make(),
\Awcodes\Curator\CuratorPlugin::make()
];

$panel
->id("control")
->path("/control")
->brandName("Control")
->login()
->emailVerification()
->passwordReset()
->colors($colors)
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverPages(in: app_path('Filament/Pages/Mandatory'), for: 'App\\Filament\\Pages\\Mandatory')
->pages($pages)
->plugins($plugins)
->databaseNotifications()
->resources($resources)
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
->widgets($widgets)
->middleware($middleware)
->authMiddleware($authMiddleware)
->navigationGroups([
'Content',
'Billing',
'Filament Shield',
]);
I'm on the /control route, and the panel is displaying the brandname "control", and the plugin is listed if I do $panel->getPlugins() If I enable the plugin on the /admin panel, it then starts to work in /control, but I can't work out why filament is getting confused about the panel. I've search ControlPanelProvider.php and the Curator repo for "admin", and the word isn't used, so it's not like something is hard-coded... Any one seen this before?
11 Replies
awcodes
awcodes11mo ago
I’ve noticed this too. Have created a reproduction repo for Dan and he is aware of it.
_andypeacock
_andypeacockOP11mo ago
Ah, ok, thanks again @awcodes ! I'll include it in /admin for now until the issue is resolved.
awcodes
awcodes11mo ago
You can also disable the navigation for it in admin to “hide” it on that panel.
_andypeacock
_andypeacockOP11mo ago
Hi @awcodes - how do you disable the navigation for it on a specific panel? I've had a poke around but can't see an obvious way of doing that.
awcodes
awcodes11mo ago
I don’t think you can currently since it’s a config setting. Give me a day and I’ll see what I can do.
Jotávio
Jotávio10mo ago
to resolve this, change panel provider order in /conf/app.
No description
awcodes
awcodes10mo ago
This might work, but there’s an underlying issue in filament. I believe it has to do with the panel navigation not compensating for plugins that may or may not be registered on the panel.
awcodes
awcodes10mo ago
Here the reproduction repo if you have time to try to figure it out. https://github.com/awcodes/filament-panels-plugin-bug
GitHub
GitHub - awcodes/filament-panels-plugin-bug
Contribute to awcodes/filament-panels-plugin-bug development by creating an account on GitHub.
Miguel García
Miguel García10mo ago
I'm facing the same issue, using just one panel and three filament plugins
"require": {
"php": "^8.1",
"bezhansalleh/filament-language-switch": "^3.0",
"bezhansalleh/filament-shield": "^3.2",
"filament/filament": "^3.2",
"filament/spatie-laravel-translatable-plugin": "^3.2",
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^10.10",
"laravel/sanctum": "^3.3",
"laravel/tinker": "^2.8",
"spatie/laravel-webhook-client": "^3.2"
},
"require": {
"php": "^8.1",
"bezhansalleh/filament-language-switch": "^3.0",
"bezhansalleh/filament-shield": "^3.2",
"filament/filament": "^3.2",
"filament/spatie-laravel-translatable-plugin": "^3.2",
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^10.10",
"laravel/sanctum": "^3.3",
"laravel/tinker": "^2.8",
"spatie/laravel-webhook-client": "^3.2"
},
This throws an error (Plugin [filament-shield] is not registered for panel [admin]):
public function panel(Panel $panel): Panel
{
...
...
->plugin(
SpatieLaravelTranslatablePlugin::make()
->defaultLocales(['es', 'en', 'fr', 'nl']),
FilamentShieldPlugin::make()
);
}
public function panel(Panel $panel): Panel
{
...
...
->plugin(
SpatieLaravelTranslatablePlugin::make()
->defaultLocales(['es', 'en', 'fr', 'nl']),
FilamentShieldPlugin::make()
);
}
And this works as expected:
public function panel(Panel $panel): Panel
{
...
...
->plugin(
FilamentShieldPlugin::make(),
SpatieLaravelTranslatablePlugin::make()
->defaultLocales(['es', 'en', 'fr', 'nl'])
);
}
public function panel(Panel $panel): Panel
{
...
...
->plugin(
FilamentShieldPlugin::make(),
SpatieLaravelTranslatablePlugin::make()
->defaultLocales(['es', 'en', 'fr', 'nl'])
);
}
awcodes
awcodes10mo ago
->plugins([])
Miguel García
Miguel García10mo ago
ufff
Want results from more Discord servers?
Add your server