diff --git a/components/com_finder/models/suggestions.php b/components/com_finder/models/suggestions.php index f4fb2c2757cb1..5e8b8638d1bb8 100644 --- a/components/com_finder/models/suggestions.php +++ b/components/com_finder/models/suggestions.php @@ -70,7 +70,7 @@ protected function getListQuery() // Limit term count to a reasonable number of results to reduce main query join size $termIdQuery->select('ti.term_id') ->from($db->quoteName('#__finder_terms', 'ti')) - ->where('ti.term LIKE ' . $db->quote($db->escape($this->getState('input'), true) . '%', false)) + ->where('ti.term LIKE ' . $db->quote($db->escape(StringHelper::strtolower($this->getState('input')), true) . '%', false)) ->where('ti.common = 0') ->where('ti.language IN (' . $db->quote($this->getState('language')) . ', ' . $db->quote('*') . ')') ->order('ti.links DESC') @@ -94,7 +94,7 @@ protected function getListQuery() ->order('t.weight DESC'); // Determine the relevant mapping table suffix by inverting the logic from drivers - $mappingTableSuffix = StringHelper::substr(md5(StringHelper::substr($this->getState('input'), 0, 1)), 0, 1); + $mappingTableSuffix = StringHelper::substr(md5(StringHelper::substr(StringHelper::strtolower($this->getState('input')), 0, 1)), 0, 1); // Join mapping table for term <-> link relation $mappingTable = $db->quoteName('#__finder_links_terms' . $mappingTableSuffix);