2 saunders May 06, 2018 15:43





meggie works OK on this b2evo site and on my site which is 6.9.7 ?? http://calstock.org.uk

because there is no commenter named "meggie". The bug happens only if you search a name of a person who commented a post and this person does really exist in you database (case sensitive).

So it has to be a commenter, yet both your handle and mine start with a lower case and the search here is fine. Am I missing something else??
Is it the_coll_search_form.widget.php you are using that calls the function or are you using some back office option that I don't know of?

You*re right; using the widget everything works fine; the bug shows up using the search in bricks_skin in the header.
I have to figure out, how to fix this.
the line, mentioned in the error message
Warning: Division by zero in /blogs/inc/collections/_search.funcs.php on line 1015
does not show any bug (in my eyes)
$display_params['percentage'] = round( $row['score'] * $max_percentage / $max_score );
Regards, Will

As the code looks OK it must be the $max_score as it's the only divisor.
Maybe you can you put an echo $max_score before that line and a die() command to see what the value is?

Thanks @amoun!
It now works, What was the fix (in case it was not fixed accidentally ;-): I edited and saved the Skin bricks_skin and deleted the search widget and reinstalled the widget, erased the cashes and: now search works as it is expected to work.
Regards, Will

Hello @saunders, really we had a bug there because we used case-sensitive function, I have fixed this in a commit https://github.com/b2evolution/b2evolution/commit/ead18a90672adb5a1e5459cf1fd30e71df048cb8.
Thank you for the report.

@yurabakhtin Thanks again for your great support. I fixed it.