Property [$form] not found on component: [app.filament.resources.process-resource.pages.view-process
So i have a custom action to aprove the process status, it was working before, but know i got this error below
https://flareapp.io/share/VmeMQLAm
My code:
https://pastecode.io/s/j7awitrj
Any ideia what can be causing this?
Flare
Property [$form] not found on component: [app.filament.resources.process-resource.pages.view-process] - The error occurred at http://cloft2.test/processes/8387
16 Replies
That means you don't have the HasForms implemeneted on the Component
but im not using any custom view
wait let me check the view resource
You are using:
app.filament.resources.process-resource.pages.view-process
If you go to the component view-process you will see that hasForms has not been implemented, but you are calling the form within the resource. You probably want to load it as disabled for reading
yes i have a view only page
im not understanding, on the view-process there is no hasForms but how was it working before? and on the documention i see the information about hasForm but only when not using the admin panel
On my view process it extends ViewRecord that i think already has forms implemented
If you extend
ViewRecord
why do you define a custom $view
then?i dont have any custom view
this was working and im did touched for a few weeks now i was testing the full system and this stoped working i dont know why yet
Sorry confused it with the livewire Alias. Can you share the viewprocess code?
sure
https://pastecode.io/s/4zpbsec7
even when i try to delete with the default delete action, it deletes the record but same error is shown
maybe it has something to do with the edit action
Hm. Nothing obvious. Does it only happen after clicking an action?
What happens if you remove all actions?
only happens when clicking in the action
cancell action and edit work fine
aprove and delete both happens the same error
Remove some stuff until it works. Maybe this:
->action(fn () => $this->record->aprove())
needs to be ->action(fn ($record) => $record->aprove())
Same for deleteCall to a member function aprove() on null
that way record is null
What about
->action(fn ($livewire) => $livewire->record->aprove())
i deleted everything from actions and know tried to find the issue
now its giving another error
when saving the updated record after change the status
Unhandled match case 'error'
but this is not from filament now
The error message is pretty obvious, right?
was a field that was no nullable now back to initial error, if i remove all other actions and keep the aprove one everything works
now trying to add action by action to see wich one causes de issue
when i put this action it starts giving the same error
Action::make('cancel')
->label(('filament::resources/pages/edit-record.form.actions.cancel.label'))
->url($this->previousUrl ?? $resource::getUrl())
->color('secondary'),];
issue is here
if i remove this $this->previousUrl it works fine
should this work this way also?
Action::make('cancel')
->label(('filament::resources/pages/edit-record.form.actions.cancel.label'))
->action(fn() => redirect()->back())
->color('secondary'),
i was able to solve it like this
Action::make('cancel')
->label(__('filament::resources/pages/edit-record.form.actions.cancel.label'))
->url(fn() => url()->previous())
->color('secondary'),