Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filamentβ€’3y agoβ€’
3 replies
kerbylav

Bug in https://filamentphp.com/plugins/filament-spatie-tags

Didn't find any other way to communicate about plugin specifically, so write here.

In SpatieTagsInput.php during saving you have such part

 $this->saveRelationshipsUsing(static function (SpatieTagsInput $component, ?Model $record, array $state) {
            if (! (method_exists($record, 'syncTagsWithType') && method_exists($record, 'syncTags'))) {
                return;
            }

            if ($type = $component->getType() && ! $component->isAnyTagTypeAllowed()) {
                $record->syncTagsWithType($state, $type);

                return;
            }

            $component->syncTagsWithAnyType($record, $state);
        });

 $this->saveRelationshipsUsing(static function (SpatieTagsInput $component, ?Model $record, array $state) {
            if (! (method_exists($record, 'syncTagsWithType') && method_exists($record, 'syncTags'))) {
                return;
            }

            if ($type = $component->getType() && ! $component->isAnyTagTypeAllowed()) {
                $record->syncTagsWithType($state, $type);

                return;
            }

            $component->syncTagsWithAnyType($record, $state);
        });


It looks like you forgot to group $type = $component->getType() assignment in condition and hence $type is always either true or false instead of real type. Please fix it πŸ™‚
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel β€’ Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

https://filamentphp.com/plugins/bezhansalleh-language-switch
FilamentFFilament / β“β”Šhelp
3y ago
Card Ui like https://filamentphp.com/plugins
FilamentFFilament / β“β”Šhelp
3y ago
Filament Spatie Translatable & Filament Spatie Tags
FilamentFFilament / β“β”Šhelp
16mo ago
https://github.com/filamentphp/filament/discussions/10370
FilamentFFilament / β“β”Šhelp
3y ago