You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@SherifElfadaly great patch! I can confirm the patch is working and to me it should be merged to master as soon as possibile since at the current state the search functionality is broken.
@SherifElfadaly fixed a part of the search results. I searched with more than 3 words which were copied from one of the answers. But results listed all questions in my English Store (some times it also included all questions from my other Chinese Store)
@lamaithanh I know this is years later but the query is not built correctly when there are multiple keywords. You can correct this by adding parenthesis to the query at line 175 like this:
for ($i=0; $i<count($explode); $i++) {
if ($i == 0) {
$select->where('(faq.title LIKE ?', "%{$explode[$i]}%");
} else {
$select->orWhere('faq.title LIKE ?', "%{$explode[$i]}%");
}
if ($i == count($explode)-1) {
$select->orWhere('faq.content LIKE ?)', "%{$explode[$i]}%");
} else {
$select->orWhere('faq.content LIKE ?', "%{$explode[$i]}%");
}
}
If you search for something that matches a value the search will crash
/faq/search/?s=feet
If you search for something with no matches it returns fine
/faq/search/?s=xxxxx
I was able to replicate this on 2.1.7 and 2.1.7.1
The text was updated successfully, but these errors were encountered: