F
Filamentβ€’16mo ago
Robin

Livewire/filament bug?

I all of a sudden encounter; Livewire\Exceptions\CorruptComponentPayloadException POST /livewire/message/app.filament.resources.vending-machine-resource.pages.view-vending-machine Livewire encountered corrupt data when trying to hydrate the [app.filament.resources.vending-machine-resource.pages.view-vending-machine] component. Ensure that the [name, id, data] of the Livewire component wasn't tampered with between requests. When opening an action modal. I didn't update anything on the page. I'm on the latest version of filament v2.
5 Replies
toeknee
toekneeβ€’16mo ago
This is usally caused by you adjusting the data in the form from the phpside and not livewire
Robin
RobinOPβ€’16mo ago
The action I have is this one:
Action::make('Update')
->color('secondary')
->requiresConfirmation()
->modalHeading('Update')
->modalSubheading('The device will pull the latest changes from the git repo and restart the service. During restart, the device is unresponsive.')
->action(function (): void {
event(new Update($this->record));
}),
Action::make('Update')
->color('secondary')
->requiresConfirmation()
->modalHeading('Update')
->modalSubheading('The device will pull the latest changes from the git repo and restart the service. During restart, the device is unresponsive.')
->action(function (): void {
event(new Update($this->record));
}),
Nothing else that's fancy on that page
toeknee
toekneeβ€’16mo ago
That looks like why, what is new Update() ? Is it changing $this->record which is used as the livewire component? Are you trying to refresh the data on the the page? $this->refresh is usually how you refresh the data, as changing the data directly in record will fall over since it does not match what is in the browser
Robin
RobinOPβ€’16mo ago
Aha! Yep, so apparently, the data of the whole model gets loaded then, so there was an "append" added on the model that didn't work. That's why it crashed when opening. Stupid mistake, thanks for rubberducking πŸ˜…
toeknee
toekneeβ€’16mo ago
Yep! no problem
Want results from more Discord servers?
Add your server