© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•11mo ago•
3 replies
dwiser

Header actions on "another" View page broken

What I did:
I created another view page as outlined in the docs here: https://filamentphp.com/docs/3.x/panels/resources/viewing-records#creating-another-view-page
php artisan make:filament-page ViewRequestApproval --resource=RequestResource --type=ViewRecord
php artisan make:filament-page ViewRequestApproval --resource=RequestResource --type=ViewRecord


I also added actions to the page header as outlined in the docs here: https://filamentphp.com/docs/3.x/panels/pages#header-actions

What happens:
When I click the action button, I get an "Unable to find component: error".

What I tried:
- Moving the same page between resources seems to cause the same problem no matter what resource the page and action is nested under.
- An action with a
->url()
->url()
seems to redirect fine but any
->form()
->form()
or
->action()
->action()
method seems to cause the same error about a missing component.
- Adding the Action to a standard ViewResource page gives the same error.

Code Reference
In
App\Filament\App\Resources\RequestResource
App\Filament\App\Resources\RequestResource
:
 
class RequestResource extends Resource
{
   public static function getPages(): array
    {
        return [
            'index' => Pages\ManageRequests::route('/'),
            'view-approval' => Pages\ViewRequestApproval::route('/{record}/approval'),
        ];
    }
}
 
class RequestResource extends Resource
{
   public static function getPages(): array
    {
        return [
            'index' => Pages\ManageRequests::route('/'),
            'view-approval' => Pages\ViewRequestApproval::route('/{record}/approval'),
        ];
    }
}


In
App\Filament\App\Resources\RequestResource\Pages\ViewRequestApproval
App\Filament\App\Resources\RequestResource\Pages\ViewRequestApproval
:

class ViewRequestApproval extends ViewRecord
{
    protected function getHeaderActions(): array
    {
        return [
            \Filament\Actions\Action::make('approve')
                ->action(function (Request $record) {
                    dump($record);
                    $record->approve();

                    $this->refreshFormData([
                        'status',
                    ]);
                })
        ];
    }
}

class ViewRequestApproval extends ViewRecord
{
    protected function getHeaderActions(): array
    {
        return [
            \Filament\Actions\Action::make('approve')
                ->action(function (Request $record) {
                    dump($record);
                    $record->approve();

                    $this->refreshFormData([
                        'status',
                    ]);
                })
        ];
    }
}


Error message:
Unable to find component: [app.filament.app.resources.request-resource.pages.view-request-approval]
vendor/livewire/livewire/src/Mechanisms/ComponentRegistry.php#116
Livewire\Exceptions\ComponentNotFoundException
Unable to find component: [app.filament.app.resources.request-resource.pages.view-request-approval]
vendor/livewire/livewire/src/Mechanisms/ComponentRegistry.php#116
Livewire\Exceptions\ComponentNotFoundException
Pages - Panels - Filament
Viewing records - Panels - Filament
Solution
I don't know what the exact cause was but
php artisan filament:optimize-clear
php artisan filament:optimize-clear
fixed the issue. Something must have been cached when setting up my local environment.
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Table header actions not showing in view page
FilamentFFilament / ❓┊help
3y ago
Hide header actions on edit page
FilamentFFilament / ❓┊help
3y ago
Customising header actions on Resource List page
FilamentFFilament / ❓┊help
3y ago
Creating another View page
FilamentFFilament / ❓┊help
3y ago