Search Page Woes
Posted: 16 May 2008 12:56 PM   [ Ignore ]  
Grad Student
Rank
Total Posts:  39
Joined  02-25-2008

Ok - I’ve tried searching for this and I can’t find anything. I’m having a really odd problem with my search results.

I’ve gone into my weblog’s path settings and I’m pointing the search results to:

http://(domain)/index.php/(template_group)/search/

Instead everytime I search, the form points to:

http://(domain)/index.php/search/results/(random letter/number)/

Here’s my simple search form code:

{exp:search:simple_form weblog="{my_template_group}" search_in="everywhere" results_page"{my_template_group}/search/" no_results_page="{my_template_group}/search/"}
    
<input type="text" name="keywords" id="keywords" value="" />
    <
input type="image" value="submit" src="/assets/images/btn_go.png">
    <
p><a href="{my_template_group}/search/advanced/">Advanced Search</a></p>
{/exp:search:simple_form}

What am I doing wrong?

Mod Edit: Moved to the Technical Support forum.

Profile
 
 
Posted: 16 May 2008 01:36 PM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12914
Joined  05-15-2004

Do you have a link to the site in question? Normally, /search/results is the default location, yes.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 16 May 2008 02:11 PM   [ Ignore ]   [ # 2 ]  
Grad Student
Rank
Total Posts:  39
Joined  02-25-2008

@Ingmar: http://blog.spotobe.com/

Profile
 
 
Posted: 16 May 2008 02:40 PM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12914
Joined  05-15-2004

Actually, the parameter is named result_page, no “s”.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 16 May 2008 02:46 PM   [ Ignore ]   [ # 4 ]  
Grad Student
Rank
Total Posts:  39
Joined  02-25-2008

@Ingmar, but that wouldn’t explain why my form action path continues to point to a different template group—would it? I’m just really frustrated at this point with it.

Also no search ever seems to return any results for me even when I manually enter the correct URL path in the address bar - even when I know there are those words in the posts. Grrrrr....

Profile
 
 
Posted: 16 May 2008 02:58 PM   [ Ignore ]   [ # 5 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12914
Joined  05-15-2004

I just tested this minimal template sucessfully:

{assign_variable:my_template_group="test"}
{exp
:search:simple_form weblog="default_site" search_in="everywhere"
result_page="{my_template_group}/search/" no_result_page="{my_template_group}/search/"}
    
<input type="text" name="keywords" id="keywords" value="" />
    <
input type="button" value="submit">
    <
p><a href="/{my_template_group}/search/advanced/">Advanced Search</a></p>
{/exp:search:simple_form}

A couple of suggestions:

1) Make sure the weblog= parameter is correct. Your are using the template group currently.
2) Make sure that {my_template_group} is actually defined.
3) The parameters are named result_page and no_result_page. You have misspelled them.
4) If you hardcode the link to the advanced search form, starting with the template_group, be sure to use a slash at the start

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 16 May 2008 03:04 PM   [ Ignore ]   [ # 6 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12914
Joined  05-15-2004

By the way, are you trying to combine both search form and results on a single template? If so, this thread might be of interest to you.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 20 May 2008 07:58 AM   [ Ignore ]   [ # 7 ]  
Grad Student
Rank
Total Posts:  39
Joined  02-25-2008

@Ingmar… Thanks. Apparently I was doing it correctly at one point, I just created an {if} statement which always would return no results. Oops.

Profile
 
 
Posted: 20 May 2008 08:02 AM   [ Ignore ]   [ # 8 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12914
Joined  05-15-2004

I see. So, all set now?

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 10:33 AM
Total Registered Members: 60719 Total Logged-in Users: 21
Total Topics: 73172 Total Anonymous Users: 14
Total Replies: 394653 Total Guests: 487
Total Posts: 467825    
Members ( View Memberlist )