|
08-19-2004, 11:41 PM | #1 |
Green Mole
Join Date: Jun 2004
Posts: 22
|
Search on search results page not working
Hi,
This is a little weird. I have a site wide search box on my site which works just fine. http://cgasson.truth.posiweb.net/new/ PHP Code:
However, if you try and resubmit the same search query (or any other query for that matter) from the search box at the top of the search results page, it returns a null result? Any ideas why? |
08-20-2004, 04:38 AM | #2 |
Purple Mole
Join Date: Jan 2004
Posts: 694
|
You are missing some variables in your form. Have a look at this thread.
|
08-20-2004, 08:07 PM | #3 |
Green Mole
Join Date: Jun 2004
Posts: 22
|
Thanks for your quick response vinyl-junkie but I think that you have mis-understood my problem.
When you do a search from the "Quick search" box in the left hand colmn under the nav bar, the search results return as you would expect it to. However, after doing a search, if you try and do another search using the search box atthe top of the search results page (not the quick search box on the left hand side), the search will produce no reults with the same or any other query in it. Looking at the code that phpDig produces for the form v's the form code I have in my quick search form, the form at the top of the Search results page seems to be missing a value in the the template_demo line: My quick search form code (which works): PHP Code:
PHP Code:
Last edited by bforsyth; 08-20-2004 at 08:12 PM. |
08-20-2004, 08:12 PM | #4 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
Compare the HTML source of your search box at the top of your page to one of the search boxes on this site, and then fix your search box form.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension. |
08-20-2004, 08:31 PM | #5 |
Green Mole
Join Date: Jun 2004
Posts: 22
|
Thanks Charter - you beat me to my post edit. This is exactly what I have done - with the results above.
And the template_demo value is the only thing that appears to be different. However, the parameters that are appearing in the GET request are significantly different: The working form (quicksearch) is producing this URL request: PHP Code:
PHP Code:
|
08-20-2004, 08:32 PM | #6 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
Why is refine set to one initially?
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension. |
08-20-2004, 08:34 PM | #7 |
Green Mole
Join Date: Jun 2004
Posts: 22
|
I've no idea? I am just looking for the code that actually produces the form at the top of the reults page.
I assume that refine is a boolean used to refine the search by searching within the resuls already returned? |
08-20-2004, 08:35 PM | #8 |
Green Mole
Join Date: Jun 2004
Posts: 22
|
Yup - If I set refine=0 then everything works as I would expect it to?
I have edited the php_dig_form function at line 130: PHP Code:
PHP Code:
Last edited by bforsyth; 08-20-2004 at 08:42 PM. |
08-20-2004, 08:48 PM | #9 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
Right, as there is no $site to refine on, what happens? No results.
PHP Code:
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension. |
08-20-2004, 10:28 PM | #10 |
Green Mole
Join Date: Jun 2004
Posts: 22
|
Thanks Charter - so my fix should be OK then?
Can you explain what the $site variable brings into play? Does it allow you to search accross multiple sites or something? |
08-20-2004, 10:35 PM | #11 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
It's okay as long as you don't ever want to refine. The $site variable holds a unique number identifying a site.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Search results returns blank page | Anton | Troubleshooting | 1 | 02-11-2006 11:20 PM |
Search results returns blank page | Anton | Troubleshooting | 0 | 01-05-2006 09:56 PM |
search results page | lukemack | How-to Forum | 1 | 11-10-2005 10:48 PM |
Search page problems, no results | kalli | Troubleshooting | 1 | 09-03-2005 01:55 PM |
highlight search results on page? | rediray | How-to Forum | 2 | 10-03-2003 04:40 AM |