filament-breezy icon indicating copy to clipboard operation
filament-breezy copied to clipboard

Call to a member function getPlugin() on null

Open ismailcaakir opened this issue 1 year ago • 4 comments

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());

ismailcaakir avatar Jan 18 '24 07:01 ismailcaakir

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 avatar Jan 19 '24 00:01 jeffgreco13

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

jeffgreco13 avatar Jan 31 '24 15:01 jeffgreco13

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

HADIL-BENATTOU avatar Mar 25 '24 03:03 HADIL-BENATTOU

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

image

dovaldev avatar Aug 18 '24 09:08 dovaldev