jeffgreco13 / filament-breezy

MIT License
779 stars 136 forks source link

Call to a member function getPlugin() on null #324

Open ismailcaakir opened 10 months ago

ismailcaakir commented 10 months ago

Call to a member function getPlugin() on null at vendor/filament/filament/src/FilamentManager.php:282

Versions: Breezy: v2.2.5.1 Laravel: 10.40.0 PHP: 8.2.14 Filament: 3.1.42

My Panel Code is:

return $panel
            ->id('dashboard')
            ->path('dashboard')
            ->login()
            ->registration(Register::class)
            ->colors([
                'danger' => Color::Rose,
                'gray' => Color::Gray,
                'info' => Color::Blue,
                'primary' => Color::Emerald,
                'success' => Color::Emerald,
                'warning' => Color::Orange,
                'test' => Color::Gray,
            ])
            ->font('Roboto', provider: GoogleFontProvider::class)
            ->discoverResources(in: app_path('Filament/Dashboard/Resources'), for: 'App\\Filament\\Dashboard\\Resources')
            ->discoverPages(in: app_path('Filament/Dashboard/Pages'), for: 'App\\Filament\\Dashboard\\Pages')
            ->pages([
                Pages\Dashboard::class,
            ])
            ->discoverWidgets(in: app_path('Filament/Dashboard/Widgets'), for: 'App\\Filament\\Dashboard\\Widgets')
            ->widgets([
                Widgets\AccountWidget::class,
                Widgets\FilamentInfoWidget::class,
            ])
            ->middleware([
                EncryptCookies::class,
                AddQueuedCookiesToResponse::class,
                StartSession::class,
                AuthenticateSession::class,
                ShareErrorsFromSession::class,
                VerifyCsrfToken::class,
                SubstituteBindings::class,
                DisableBladeIconComponents::class,
                DispatchServingFilamentEvent::class,
            ])
            ->authMiddleware([
                Authenticate::class,
            ])
            ->tenant(Team::class, 'id')
            ->tenantRegistration(RegisterTeam::class)
            ->tenantProfile(EditTeamProfile::class)
            ->plugin(BreezyCore::make());
jeffgreco13 commented 10 months ago

You may not have set a default panel? If you look in FilamentManager, getCurrentPanel is returning null. Can you include the stack trace for this error and the steps to reproduce?

jeffgreco13 commented 10 months ago

@ismailcaakir is this still an issue or did the above work?

HADIL-BENATTOU commented 8 months ago

I still have the same problem although I confirmed that the 'getCurrentPanel' function does not return null So what is the solution ? Capture

dovaldev commented 3 months ago

Hi, I had the same error, and I fixed it by adding this: ->default() to the$panel.

image