SpatieMediaLibraryFileUpload not working on $this->form->fill() after upgrading to v3
I upgraded to Filament v3 and everything has been super smooth except for one part
For some reason the SpatieMediaLibrary plugin (which is also upgraded to v3) is not operating as expected. I'm getting the following error when my form component loads:
This seems to stem from using the media library to populate the form in the
If I remove this line or change it to a simple value (e.g. a string), the form loads and the component renders, but obviously it doesn't load with any pre-filled data (i.e. any images that were previously uploaded)
Does anyone know what needs to change here?
For some reason the SpatieMediaLibrary plugin (which is also upgraded to v3) is not operating as expected. I'm getting the following error when my form component loads:
This seems to stem from using the media library to populate the form in the
mount() method of the component, which looks like this:If I remove this line or change it to a simple value (e.g. a string), the form loads and the component renders, but obviously it doesn't load with any pre-filled data (i.e. any images that were previously uploaded)
Does anyone know what needs to change here?
Solution
I found the cause... I was missing the call to
->model() on the end of my $form in the component