Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extending profile page throws an exception: Unable to find component: [app.filament.pages.auth.edit-profile] #15374

Open
afbora opened this issue Jan 18, 2025 · 5 comments
Labels

Comments

@afbora
Copy link

afbora commented Jan 18, 2025

Package

filament/filament

Package Version

3.2.133

Laravel Version

11.38.2

Livewire Version

3.5.12

PHP Version

8.4.3

Problem description

I'm trying to extend profile form page via https://filamentphp.com/docs/3.x/panels/users#customizing-the-authentication-features documentation. I did exactly the same as the example in the document, but it still gives an error: Unable to find component: [app.filament.pages.auth.edit-profile]

Expected behavior

The custom profile page should not give any errors.

Steps to reproduce

Follow the Customizing the authentication features section in the https://filamentphp.com/docs/3.x/panels/users#customizing-the-authentication-features

use App\Filament\Pages\Auth\EditProfile;
use Filament\Panel;
 
public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->profile(EditProfile::class);
}
<?php
 
namespace App\Filament\Pages\Auth;
 
use Filament\Forms\Components\TextInput;
use Filament\Forms\Form;
use Filament\Pages\Auth\EditProfile as BaseEditProfile;
 
class EditProfile extends BaseEditProfile
{
    public function form(Form $form): Form
    {
        return $form
            ->schema([
                TextInput::make('username')
                    ->required()
                    ->maxLength(255),
                $this->getNameFormComponent(),
                $this->getEmailFormComponent(),
                $this->getPasswordFormComponent(),
                $this->getPasswordConfirmationFormComponent(),
            ]);
    }
}

And go to profile page and type any password and wait 500ms (since 500ms debounce). You'll get the error.

Clue about the issue, maybe you have an idea: Error is gone when removed the ->live() method in getPasswordFormComponent() method.

Reproduction repository (issue will be closed if this is not valid)

https://github.com/filamentphp/demo

Relevant log output

@VladimirBazhenov
Copy link

Try to put the class file according to the instructions.

And if the namespace is capitalized, for example Dashboard, make sure that the panel id is also capitalized:
return $panel ... ->id('Dashboard') ...

@bdsoha
Copy link

bdsoha commented Jan 21, 2025

I am having the same issue and it only started happening after a recent release.

@afbora
Copy link
Author

afbora commented Jan 21, 2025

@VladimirBazhenov I've no tenancy setup. This is new filament app and namespaces are correct.

@VladimirBazhenov
Copy link

It uses the same mechanism, try it.

@afbora
Copy link
Author

afbora commented Jan 21, 2025

I opened the codes to try the tenancy solution @VladimirBazhenov mentioned and ran it again. Interestingly, it worked without making any changes, it did not give any errors. All versions are the same, I did not make any code changes. There is no problem for now.

It was not working even though I cleared all the caches, it seems to be working now 🤷‍♂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

3 participants