Sorting is bugged when using Spatie Translatable plugin, search works only with lowercase
Hello, I'm using Filament 3 with Spatie Translatable plugin by Filament and I've ran into bugs when trying to sort or search translatable columns.
At the moment there's 2 languages - Lithuanian and English. It seems that sorting translated columns ignores selected language and always sorts by English values (panel itself only uses English language).
Also, not sure if it's Translatable plugin related, but the search only works if input is lowercase.
6 Replies
up? :/
I am using the same plugin here:
it seems working fine here
https://demo.larazeus.com/admin/forms?tableSortColumn=name&tableSortDirection=asc
and the code:
https://github.com/lara-zeus/bolt/blob/03c6efa82b5d15454161d9162adc055c7c9b4ed6/src/Filament/Resources/FormResource.php#L155C17-L155C43
can you check the queries with something like the debug bar?
We have a simular issue, with the fields
when we change from english to another language the name in the fields doesnt change it stays in english. even tho in the form, frontend or database, the other language has a diferente text
(this issue also happens in your demo website)
which pages were you testing on my demo site?
test it here and its working unless i am missing something?
https://demo.larazeus.com/admin/forms
is it a relations?
it happens on the form field
in title & slug it translates just fine.
on the form fields part it doesnt
the section and fields are relations and wont work and we cant find solution
https://github.com/lara-zeus/translatable/issues/8
I released a new version for an attempt to fix this issue
currently the demo working on the last version, if you want to test it.
if its working as expected, you can use my fork of the plugin translatable, just add:
for now, the changes on #9 will allow us to store uploaded files and relations, as long as we save before switching the local. (btw there is a shortcut on the forms (ctrl+s))
not prefect, yes. but at least now its usable.
next is working on persist the data when the user switch the local and store the other locals not only the active one.
feedback is appreciated π