forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: adrianbj on July 20, 2006, 07:05:48 pm

Title: Wildcard search not working in 1.4.8
Post by: adrianbj on July 20, 2006, 07:05:48 pm
I can't seem to make the wildcard search work in 1.4.8

I know it used to work when I first installed CPG back in the 1.3x era, but I am not sure when it stopped working. I know that Nibbler fixed this issue in svn revision 3036, but 1.4.8 is up to svn revision 3116, so it should be working. In fact I notice it is working on your demo board, so I am a little baffled as to what is going on - is the demo board running the stock 1.4.8 installation?

The line that seems to be most relevant to me is:

$search_string = strtr($search_string, array('_' => '\_', '%' => '\%', '*' => '%'));

from the search.inc.php file. It certainly seems like it should do the job of converting the * to %.

My gallery is available at http://ian.umces.edu/imagelibrary/

Please let me know if there is anything else I can post to help debug this.

Thanks,
Adrian
Title: Re: Wildcard search not working in 1.4.8
Post by: Nibbler on July 20, 2006, 07:18:45 pm
Enable debug output so we can see the query when you use a wildcard. If you don't want to do that then enable it for yourself and post us the results.
Title: Re: Wildcard search not working in 1.4.8
Post by: Sami on July 20, 2006, 07:23:12 pm
You are using MOD for search try disable that mod and test orginal search , standard installation of cpg 1.4.8 is okey with wildcard search
Title: Re: Wildcard search not working in 1.4.8
Post by: adrianbj on July 20, 2006, 07:24:51 pm
This is what I get

USER:
------------------
Array
(
    [ID] => ce9c83f834445bc81b2f59d530cc194b
    [am] => 1
    [liv] => Array
        (
           
Title: Re: Wildcard search not working in 1.4.8
Post by: Nibbler on July 20, 2006, 07:26:18 pm
Switch your gallery to UTF-8 encoding.
Title: Re: Wildcard search not working in 1.4.8
Post by: adrianbj on July 20, 2006, 07:28:00 pm
bmossavari,

I added a simple search field to the top of my gallery, but the main search page (search.php) is the standard 1.4.8 code. Is there something I am missing that you are referring to?
Title: Re: Wildcard search not working in 1.4.8
Post by: adrianbj on July 20, 2006, 07:29:57 pm
Nibbler,

It was the encoding issue - thanks for that!

Adrian