Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-24424

eZ Country FieldType: Search doesn't work properly after multiple selecting many countries

    XMLWordPrintable

Details

    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

      Attachments

        Activity

          People

            Unassigned Unassigned
            eduardo.fernandes-obsolete@ez.no Eduardo Fernandes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: