Table filters are case-sensitive

Hello,

I’ve installed a new instance of Dolibarr v11.0.3
Now when I filter a table, the filtering is case sensitive, which is not desirable.

Example:
/user/list.php?leftmenu=users
I typed “a” in the “Name” field filter and applied. Now names with a capital “A” are not shown.

Hi Prosysdev,

This is strange. I am not experiencing this at all, and by default Dolibarr uses a case insensitive collation for the database. Maybe you could check on that side.

Regards,
Marc

1 Like

Greetings Marc,

Thank you very much for your reply. I’ve fixed the issue and it was exactly what you guessed. Although I’ll describe my solution for other users:

Ubuntu 18 LTS
Dolibarr installer failed to create the database and reported errors related to the creation of foreign keys.
So I created it manually and specified utf8 as the character set and utf8_bin as the collation as it is faster than the cs variants. That was my fault.
When I encountered the case sensitivity problem in Dolibarr, I converted the database to the utf8_unicode_ci collation and corrected the config accordingly in php then I tried a filter, and the behavior was the same so I created this topic.
But later I tried manual sql execution in the command line and the comparison was cs!
After examining the tables and columns I found that they were stuck to bin independently of the db collation.
I made a script to convert each table to utf8_unicode_ci and voila Dolibarr filters as expected now!

I know it was silly to specify a cs collation at db creation for Dolibarr.

Have a nice day :blush:

1 Like