Search problem... Search problem...
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Search problem...

Started by oscar_rocha, July 26, 2006, 04:28:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

oscar_rocha

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??

Joachim Müller

Try clearing your cookies, and post a link to your site, so we could test for ourselves.

oscar_rocha

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!!

Nibbler

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']);
}

oscar_rocha

Thanks for the answer, now it's working very good! CPG is great!


Joachim Müller

@Nibbler: should this go into the core code?

Nibbler


Joachim Müller

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.