https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19967 Bug ID: 19967 Summary: Search patrons with non-Latin languages is brocken if DefaultPatronSearchFields includes dateofbirth Change sponsored?: --- Product: Koha Version: 16.11 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: ulrich.kleiber@bsz-bw.de QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com In this particular case you get the mysql error message: Illegal mix of collations for operation 'like' You can prevent this error by removing dateofbirth from DefaultPatronSearchFields or by the following patch: diff --git a/C4/Utils/DataTables/Members.pm b/C4/Utils/DataTables/Members.pm index 2446703..ba32a12 100644 --- a/C4/Utils/DataTables/Members.pm +++ b/C4/Utils/DataTables/Members.pm @@ -117,7 +117,12 @@ sub search { my @where_strs_or; for my $searchfield ( split /,/, $searchfields->{$searchfieldstype} ) { - push @where_strs_or, "borrowers." . $dbh->quote_identifier($searchfield) . " LIKE ?"; + if ( $searchfield eq 'dateofbirth' ) { + push @where_strs_or, "DATE_FORMAT(borrowers." . $dbh->quote_identifier($searchfield) . ", '%Y-%m-%d') LIKE ?"; + } else { + push @where_strs_or, "borrowers." . $dbh->quote_identifier($searchfield) . " LIKE ?"; + } + push @where_args, $term; } -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.