Details
-
Bug
-
Resolution: Fixed
-
Medium
-
5.3.2, 5.4.2
-
None
Description
When searching for in ezcountry fieldtype, if the multiselect option is checked and many (10+?) countries are selected, only the first ones will be searchable/found.
$query = new SearchQuery(); $query->criterion = new Criterion\Field( "countries" , Criterion\Operator::CONTAINS, $countryName );
sort_key_string is defined as varchar(255) and, in case of eZ County datatype will receive a "comma separated lowercase country names"
// Sort key should contain comma separated lowercased country names.
$fieldDef->defaultValue->sortKey = $storageDef->dataText5;
The problem is, if you have multiple select enabled in eZ Country, there may be more than 255 characters and the sort_key_string will be truncated, leaving out part of the countries