Create tenant page breaks if we have a custom profile page

I got the custom profile page working and everithing works except the create tenant page, here's an example of my AppPanelProvider:
public function panel(Panel $panel): Panel
{
return $panel
->id('app')
->path('app')
->topNavigation()

->login()
->registration()
->passwordReset()
->emailVerification()
->userMenuItems([
'profile' => MenuItem::make()
->label('Profile')
->icon('heroicon-o-user')
->url(static fn (): string => EditProfile::getUrl()),
])

->tenant(Team::class, slugAttribute: 'uuid')
->tenantRegistration(CreateTeam::class)
->tenantProfile(EditTeamProfile::class)
->tenantBillingProvider(new CashierStripeBillingProvider())
...
}
public function panel(Panel $panel): Panel
{
return $panel
->id('app')
->path('app')
->topNavigation()

->login()
->registration()
->passwordReset()
->emailVerification()
->userMenuItems([
'profile' => MenuItem::make()
->label('Profile')
->icon('heroicon-o-user')
->url(static fn (): string => EditProfile::getUrl()),
])

->tenant(Team::class, slugAttribute: 'uuid')
->tenantRegistration(CreateTeam::class)
->tenantProfile(EditTeamProfile::class)
->tenantBillingProvider(new CashierStripeBillingProvider())
...
}
Any idea what could be happening? The error I get is Missing required parameter for [Route: filament.app.pages.edit-profile] [URI: app/{tenant}/edit-profile] [Missing parameter: tenant]. We don't have a tenant in the tenant create page, but it's still required when you create the route for the Edit Profile.
10 Replies
Emmanuel
Emmanuel15mo ago
How did you solve this issue? I am having the same problem.
erdiegoant
erdiegoantOP15mo ago
@eketcha I wasn't able to solve it yet, decided to look at it later and removed create tenant page for now
Ben
Ben15mo ago
Need to see the EditTeamProfile code, it looks like your custom edit profile tenant page misconfigured the route, make sure you extend the correct class here Filament\Pages\Tenancy\EditTenantProfile
erdiegoant
erdiegoantOP15mo ago
@benny.dev Sure!
use Filament\Forms\Components;
use Filament\Forms\Form;
use Filament\Pages\Tenancy\EditTenantProfile;

class EditTeamProfile extends EditTenantProfile
{
protected static ?string $slug = 'settings';

public static function getLabel(): string
{
return 'Team Settings';
}
...
use Filament\Forms\Components;
use Filament\Forms\Form;
use Filament\Pages\Tenancy\EditTenantProfile;

class EditTeamProfile extends EditTenantProfile
{
protected static ?string $slug = 'settings';

public static function getLabel(): string
{
return 'Team Settings';
}
...
Sorry, this isn't the page The one that has trouble is the custom profile page
Ben
Ben15mo ago
Yes, that slug property. try to comment it then go to register tenant
erdiegoant
erdiegoantOP15mo ago
@benny.dev this is my edit profile page (user profile, not tenant profile)
use Filament\Forms\Form;
use Filament\Forms\Components;
use Filament\Pages\Page;

class EditProfile extends Page
{
protected static string $view = "http.web.domain.dashboard.pages.edit-profile";

protected static bool $shouldRegisterNavigation = false;
...
}
use Filament\Forms\Form;
use Filament\Forms\Components;
use Filament\Pages\Page;

class EditProfile extends Page
{
protected static string $view = "http.web.domain.dashboard.pages.edit-profile";

protected static bool $shouldRegisterNavigation = false;
...
}
And if I'm logged in and working normally it works, but if I try to go into the create tenant page it breaks This is a custom profile page as I wanted it to have the same layout of the other pages And this is my panel config
return $panel
->id('app')
->path('app')
->topNavigation()

->login()
->registration()
->passwordReset()
->emailVerification()
->userMenuItems([
'profile' => MenuItem::make()
->label('Profile')
->icon('heroicon-o-user')
->url(static fn (): string => EditProfile::getUrl()),
])

->tenant(Team::class, slugAttribute: 'uuid')
->tenantRegistration(CreateTeam::class)
->tenantProfile(EditTeamProfile::class)
->tenantBillingProvider(new CashierStripeBillingProvider())
...
return $panel
->id('app')
->path('app')
->topNavigation()

->login()
->registration()
->passwordReset()
->emailVerification()
->userMenuItems([
'profile' => MenuItem::make()
->label('Profile')
->icon('heroicon-o-user')
->url(static fn (): string => EditProfile::getUrl()),
])

->tenant(Team::class, slugAttribute: 'uuid')
->tenantRegistration(CreateTeam::class)
->tenantProfile(EditTeamProfile::class)
->tenantBillingProvider(new CashierStripeBillingProvider())
...
joaopaulolndev
joaopaulolndev15mo ago
I have the same problem. I didn’t find a solution yet
johncarter
johncarter12mo ago
Yeah, I'm facing the same issue. If there is no tenant created yet i.e. you get redirected to /{panel}/new to create a tenant the edit profile menu item is still attempted to be created but the /{panel}/{tenant}/edit-profile can't be created. Did anyone solve that yet? Did anyone open an issue?
johncarter
johncarter12mo ago
GitHub
Custom EditProfile page in multi-tenancy causes `Missing required...
Package filament/filament Package Version v3.0.91 Laravel Version v10.30.1 Livewire Version v3.1.0 PHP Version PHP 8.2.13 Problem description When adding a custom EditProfile screen to a panel with...
johncarter
johncarter12mo ago
I think you can't have a Filament\Pages\Page without a tenant. It has to be a Filament\Pages\SimplePage
Want results from more Discord servers?
Add your server