By Richard Fontaine on Tuesday, 25 October 2022
Posted in Technical Issues
Replies 5
Likes 0
Views 807
Votes 0
Hello,
i saw in the version 6.0.5 of easyblog that
inf the file administrator/components/com_easyblog/models/search.php

there are parenthesis missing in line 151, the first and the last one below (I added them myself)

$where = '((' . implode(') OR (', $wheres) . '))';
Have you corrected that in the following versions ?
if not, when do you correct it ?
Kind regards
Ohh I see. Now I see the problem and you are right. 👍

Thanks for letting us know and greatly appreciated.

I will log this into our issue tracker.
·
Tuesday, 25 October 2022 15:11
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

The SQL query is looking fine for me here and adding another () has the same behavior as the original query.
·
Tuesday, 25 October 2022 10:45
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,
when you have 2 search keywords and you want to also select within a category it doesn't work. It doesn't take the category filter in account because you have a (condition 1) OR (condition 2) AND (condition 3) AND (category_id ='xx'). So you need to add parenthesis around the ((condition 1) OR (condition 2) ).
I understand it is not obvious but that is the way it is. And the code "looks" good because there are already parenthesis, but with the implode that only give the first "(" and the last ")" of my first example. We still miss the additional "(" and ")" around the overall OR conditions.
After all, my ticket is more for you than for me since I have solved the problem on my end.
Regards
·
Tuesday, 25 October 2022 14:17
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Richard for improving the serch function for EasyBlog..hope Stackideas guys can fix it so it work for the customers as well..

Tks.
·
Tuesday, 25 October 2022 16:32
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Ssnobben,

The fix will be included in the next release of EasyBlog.
·
Tuesday, 25 October 2022 16:37
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post