#Unable to find component when clicking on an action

3 messages · Page 1 of 1 (latest)

novel mirage
#

I have a custom action in a custom Filament page:


// ...
use Filament\Actions\Action;
// ...

class LoginTwoFactor extends Page implements HasForms, HasActions
{
    use InteractsWithForms;
    use InteractsWithFormActions;

    protected static string $layout = 'filament.layouts.login';

    public function mount(): void
    {
        $this->form->fill();
    }

    public function resendAction(): Action
    {
        return Action::make('resend')
            ->label('Opnieuw versturen')
            ->color('info')
            ->action(function ($data) {

                auth()->user->notify(app(SendOTP::class));
            });
    }

    // ...
}

When I click on the action button it gives me the following error:

Unable to find component: [app.filament.pages.auth.login-two-factor]

To me it's totally unclear where this message comes from. I never reference the mentioned view? Can someone explain to me what's actually happening? If you need more code or information I will provide it.

novel mirage
#

I see a similar question here: https://www.answeroverflow.com/m/1169485158752198746 but the path of my component seems right, it's in the App\Filament\Pages\Auth directory and is called LoginTwoFactor

I am facing an error i.e. Unable to find component: [app.filament.resources.appraisal-response-resource.pages.appraisal-response-request] . This error is occurring when the page is loading for the first time, when refreshing the page, when i try to update any field and when I click on the save button. Please help me to solve this issue. Thank ...

#

Hmm, moving the class to the Livewire/Auth directory helped me. But how can I keep the pages in the App\Filament\Pages\Auth directory. Or is that not possible?