FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » member search fails in 2.7.4
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
member search fails in 2.7.4 [message #30333] Sat, 18 February 2006 17:45 Go to next message
Aonmaster is currently offline  Aonmaster   Russian Federation
Messages: 28
Registered: December 2003
Karma: 0
Junior Member
Dear developers,

I've upgraded from 2.6.9 to 2.7.4 and noticed that member search no longer works.

How could I track the issue and restore it?
my forum is at http://forum.akl.ru/fudforum

A suggestion is hanging around: the search is case-sensitive, but it is probably better to make it not.

Thanks for help!

[Updated on: Sat, 18 February 2006 17:46]

Report message to a moderator

Re: member search fails in 2.7.4 [message #30348 is a reply to message #30333] Sun, 19 February 2006 20:55 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
It works fine on this forum right here. What database are you using?

FUDforum Core Developer
Re: member search fails in 2.7.4 [message #30357 is a reply to message #30348] Mon, 20 February 2006 02:44 Go to previous messageGo to next message
Aonmaster is currently offline  Aonmaster   Russian Federation
Messages: 28
Registered: December 2003
Karma: 0
Junior Member
Yes it does, I tried it here.

MySQL 4.1.7-log
character set system utf8

Even if I search for an English name (e.g. sgk), it doesn't find it on my forum.
Re: member search fails in 2.7.4 [message #30366 is a reply to message #30357] Mon, 20 February 2006 14:42 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I suspect it has to do with the UTF-8 charset encoding used on your forum. Try to change it to ISO_8859-15 and see if the search starts to work.

FUDforum Core Developer
Re: member search fails in 2.7.4 [message #30367 is a reply to message #30366] Mon, 20 February 2006 15:02 Go to previous messageGo to next message
Aonmaster is currently offline  Aonmaster   Russian Federation
Messages: 28
Registered: December 2003
Karma: 0
Junior Member
Ilia,

utf8 is, I suspect, the internal charset in MySQL, which I'm afraid I can not change. It's a hosting provider's database.

my forum encoding is koi8-r, and in previous version the search did work.

The fact is that in Search for messages section, the search works well... (the same charset being used n both cases).
Re: member search fails in 2.7.4 [message #30379 is a reply to message #30367] Tue, 21 February 2006 14:41 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Well, the search for members uses a basic LIKE query to perform searching. So its not really anything that the forum is doing. You don't need any special access to alter the charset of the users table however.

FUDforum Core Developer
Re: member search fails in 2.7.4 [message #30610 is a reply to message #30379] Sat, 04 March 2006 19:38 Go to previous messageGo to next message
Aonmaster is currently offline  Aonmaster   Russian Federation
Messages: 28
Registered: December 2003
Karma: 0
Junior Member
I found a reason.
MySQL 4.1.7, when given a query "LIKE 's%'" returned zero results.
I changed code to '%s%' and it worked.

Furthermore, I did a little code hack so that the User search would become case insensitive:
in fudforum_data/src/finduser.php.t:

if ($usr_login) {
// case sensitivity hack by MaximP
$usr_login1=strtoupper($usr_login);
$qry = 'UPPER(alias) LIKE '._esc(char_fix(htmlspecialchars(addcslashes('%'.$usr_login1.'%','\\')))).' AND';
// $qry = 'alias LIKE '._esc(char_fix(htmlspecialchars(addcslashes($usr_login.'%','\\')))).' AND';
} else {
$qry = '';
}
then don't forget to rebuild the theme.

Ilia, is it useful enough to be included into further versions?
Re: member search fails in 2.7.4 [message #30625 is a reply to message #30610] Sun, 05 March 2006 16:57 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Doing a search where the query string is contained within % ala %foo% rather then foo% no index can be used. This means that search query will be slower and only get slower and slower as more users registers. I definately won't add something like that.

FUDforum Core Developer
Re: member search fails in 2.7.4 [message #30628 is a reply to message #30625] Sun, 05 March 2006 17:05 Go to previous message
Aonmaster is currently offline  Aonmaster   Russian Federation
Messages: 28
Registered: December 2003
Karma: 0
Junior Member
Agreeing with you as per index usage, the thing that in some circumstances (as I faced) the search would not work at all, this workaround seemed for me being rather better than worse Smile
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: SD: Invalid SMTP return code: 451 See http://pobox.com/~djb/docs/smtplf.html.
Next Topic: Collapsed/Compact/Open
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 13:14:13 GMT 2024

Total time taken to generate the page: 0.02314 seconds