F
Filament5mo ago
Pan

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
composer update

php artisan filament:upgrade
composer update

php artisan filament:upgrade
even the
npm install
npm install
since it was occuring on my livewire page I tried
php artisan vendor:publish --tag=filament-config
php artisan vendor:publish --tag=filament-config
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:
div class="wrapper w-full md:max-w-5xl mx-auto pt-20 px 4">

<h1 class="text-xl font-medium">Laboratory Equipments</h1>

<x-filament::button

href="/app"

tag="a"

>

Access Panel

</x-filament::button>



<section class="pt-4">

{{ $this->table }}

</section>



</div>
div class="wrapper w-full md:max-w-5xl mx-auto pt-20 px 4">

<h1 class="text-xl font-medium">Laboratory Equipments</h1>

<x-filament::button

href="/app"

tag="a"

>

Access Panel

</x-filament::button>



<section class="pt-4">

{{ $this->table }}

</section>



</div>
The
{{ $this->table }}
{{ $this->table }}
is highlighted on the debug page It used to work before I update, but I really want that export feature
10 Replies
Pan
Pan5mo ago
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
mistercool5226
mistercool52264mo ago
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
toeknee
toeknee4mo ago
Can you provide your Imagecolumn schema?
mistercool5226
mistercool52264mo ago
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 :
No description
Saade
Saade4mo ago
Looks like a bug. Please open an issue on the filamentphp/filament repo. Actually, please send your composer.lock and .json here please
mistercool5226
mistercool52264mo ago
And 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()"
Saade
Saade4mo ago
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
mistercool5226
mistercool52264mo ago
@Saade i did it and it worked, thanks for your time ! Good for me 👍