coppermine-gallery.com/forum

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: oscar_rocha on July 26, 2006, 04:28:45 PM

Title: Search problem...
Post by: oscar_rocha on July 26, 2006, 04:28:45 PM
Hello guys...

I'm very happy using CPG, specially using the keywords (tags) navigation feature that is related to the search function.

My problem is the next:
If I do a quick search of "whatever" in the search page, and I include a parameter in the "newer than" field (i.e. 5), and click search, problably I will get a result or not (depending on my db), but if later I click on a keyword from the displayed images it will be still searching with the "newer_than" condition, so in many cases i don' get any result because not only will be searching for the keyword but also for the condition...

How can improve my code to have keywords navigation clear of previous parameters?
Can this be a bug in the search??
Title: Re: Search problem...
Post by: Joachim Müller on July 26, 2006, 07:07:34 PM
Try clearing your cookies, and post a link to your site, so we could test for ourselves.
Title: Re: Search problem...
Post by: oscar_rocha on July 26, 2006, 09:27:32 PM
Thanks for answering, unfortunately our website is in a localserver, but i performed a trial with your coppermine demo site in your homepage.

So check this:
Step 1: Performed a search of "ArtitstWantedCompetition2006", with field "Newer than" empty, so the search gave me 20 pages of results.
Step 2: Performed a search of "ArtitstWantedCompetition2006" now with fiel "newer than" = 200 days, got 6 pages results.

Till here everything is ok, but suppose I continue navigating, so "randomly" go to album "architecture" and find "Carrousel - Alderdi Eder" (first album pic) and I find it "interesting", so in order to see more, I click its keyword which again is "ArtitstWantedCompetition2006" and unfortunately it displays me only 6 result pages...so there's something wrong, because i performed a research hours ago and cpg is still recording the parameter, I've tried this in several machines and happens the same until I make an empty search and restart keyword navigating.

I will thank your answers!!
Title: Re: Search problem...
Post by: Nibbler on July 26, 2006, 10:19:09 PM
Try changing thumbnails.php from


if (isset($_GET['search'])) {
    $USER['search']['search'] = $_GET['search'];
}


to


if (isset($_GET['search'])) {
    $USER['search'] = array('search' => $_GET['search']);
}
Title: Re: Search problem...
Post by: oscar_rocha on July 27, 2006, 12:01:51 PM
Thanks for the answer, now it's working very good! CPG is great!

Title: Re: Search problem...
Post by: Joachim Müller on December 27, 2006, 09:36:51 AM
@Nibbler: should this go into the core code?
Title: Re: Search problem...
Post by: Nibbler on December 27, 2006, 06:24:18 PM
Yes, it should.
Title: Re: Search problem...
Post by: Joachim Müller on December 28, 2006, 09:54:46 AM
Committed to stable and devel branch of SVN, i.e. the fix will be in cpg1.4.11 and cpg1.5.0. Marking thread accordingly.