Upgrade from 3.0 to 3.2 led to SpatieMedia::hasRelationship does not exist in my livewire
What I am trying to do:
I am updating from filament 3.0 to 3.2 for the sake of getting the csv export feature.
What I did:
I did the these
even the
since it was occuring on my livewire page
I tried
if it might help but same result
My issue/the error:
I keep getting this error when loading the livewire page
Method Filament\Tables\Columns\SpatieMediaLibraryImageColumn::hasRelationship does not exist.
Code:
The is highlighted on the debug page
It used to work before I update, but I really want that export feature
10 Replies
actually it occurs on pages wherein I am using SpatieMediaLibraryImageColumn like within the filament itself.
bump π₯Ή
another bump, now, i tried rolling back and i still get the same error
Hey, i have the same problem when i upgrade the spatie media library package for filament.
It seems like the problem appears at the 3.2.17 release, by calling $this->hasRelationship but i think the class doesn't have the good extension to call the method, so i have too the error when i try to load a view which contains a table with SpatieMediaLibraryImageColumn.
I can't upgrade the package after the 3.2.16 release
Can you provide your Imagecolumn schema?
The problem doesn't provide from the schema, it comes from this merge : https://github.com/filamentphp/spatie-laravel-media-library-plugin/commit/445a489a95a5f0e1bbce076c2836395606cb0cee
And i have a panel with an Author resource, so in my ListAuthors page i have the following table which worked perfectly well until the merge and get the error from the post :
Looks like a bug. Please open an issue on the
filamentphp/filament
repo.
Actually, please send your composer.lock and .json here pleaseAnd this is the error message : "[previous exception] [object] (BadMethodCallException(code: 0): Method Filament\Tables\Columns\SpatieMediaLibraryImageColumn::hasRelationship does not exist. at /var/www/html/vendor/filament/support/src/Concerns/Macroable.php:72)
[stacktrace]
#0 /var/www/html/vendor/filament/spatie-laravel-media-library-plugin/src/Tables/Columns/SpatieMediaLibraryImageColumn.php(128): Filament\Support\Components\Component->__call()"
Your
filament/filament
version is 3.1.8
while the subpackages (filament/spatie-laravel-media-library-plugin
) are on v3.2.37
Please constrain all filament packages to ^3.2
and run composer update
to update the packages to the correct version@Saade i did it and it worked, thanks for your time ! Good for me π