Search "resultpage" suddenly stopped working

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
beattie
Forum Members
Forum Members
Posts: 98
Joined: Sun Dec 21, 2008 11:35 pm

Search "resultpage" suddenly stopped working

Post by beattie »

I'm using CMSMS 1.5.1. Have just noticed that my search box is returning results in the same page. When I last checked a few days ago it was working fine and responding correctly to the "resultpage" parameter with results displaying in a new "Search Results" page.

Could it be that the {search} code is in a global content block? but then why was it working fine last time I checked?

I have added the Captcha and Newsletter Made Simple modules since I last checked the search box but I can't see why this would affect the search function.

Have trawled the forums but no clues, any ideas?  ???
ID2020
Forum Members
Forum Members
Posts: 39
Joined: Wed Feb 08, 2006 12:47 am
Location: Netherlands, Tilburg

Re: Search "resultpage" suddenly stopped working

Post by ID2020 »

Clould you post a url tot the site or provide the code you used.
beattie
Forum Members
Forum Members
Posts: 98
Joined: Sun Dec 21, 2008 11:35 pm

Re: Search "resultpage" suddenly stopped working

Post by beattie »

This is the site in development: http://www.smudgedesign.com.au/japan/

The search function is at the bottom of the rhs sidebar.

Inside a global content block, I'm using this code which is inside a sidebar div: {search  searchtext="" resultpage="results" submit="Search"}

This is the search template code:

Code: Select all

{$startform}

    <label for="{$search_actionid}searchinput">{$searchprompt}</label>: <input type="text" id="{$search_actionid}searchinput" name="{$search_actionid}searchinput" size="20" maxlength="50" value="{$searchtext}" {$hogan}/><input name="submit" value="{$submittext}" type="submit" />
{if isset($hidden)}{$hidden}{/if}

{$endform}
This is the results template code:

Code: Select all

<h3>{$searchresultsfor} "{$phrase}"</h3>
{if $itemcount > 0}
<ul>
  {foreach from=$results item=entry}
  <li>{$entry->title} - <a href="{$entry->url}">{$entry->urltxt}</a> ({$entry->weight}%)</li>
  {* 
     You can also instantiate custom behaviour on a module by module basis by looking at
     the $entry->module and $entry->modulerecord fields in $entry 
      ie: {if $entry->module == 'News'}{News action='detail' article_id=$entry->modulerecord detailpage='News'} 
  *}
  {/foreach}
</ul>

{else}
  <p><strong>{$noresultsfound}</strong></p>
{/if}
And this is the link to the search results page: [email]http://www.smudgedesign.com.au/japan/in ... ge=results[/email]

I've tried reindexing the content in the search module and clearing the cache in global settings. It's baffling me because it was working a few days ago and I can't figure out what's changed.

Thanks for your help and best wishes for 2009!
beattie
Forum Members
Forum Members
Posts: 98
Joined: Sun Dec 21, 2008 11:35 pm

Re: Search "resultpage" suddenly stopped working

Post by beattie »

anybody?
Ziggywigged
Power Poster
Power Poster
Posts: 424
Joined: Sat Feb 02, 2008 12:42 am
Location: USA

Re: Search "resultpage" suddenly stopped working

Post by Ziggywigged »

I just tested and it worked for me. Results showed in the 'Search Result' page.
Take a penny, leave a penny.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12710
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Search "resultpage" suddenly stopped working

Post by Dr.CSS »

Hmm I just tried the link for the results page and came up wuth a blank page, do you have a page called results (as the alias)?...
beattie
Forum Members
Forum Members
Posts: 98
Joined: Sun Dec 21, 2008 11:35 pm

Re: Search "resultpage" suddenly stopped working

Post by beattie »

Yes Mark sorry, I did in fact change the results page alias while testing out different options to get it to work. As far as I can tell, from my computer and browser setup it's still displaying results in the same page instead of the results page. (Will change the alias back to avoid confusion due to previous post). Any help with this would be very much appreciated  :)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12710
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Search "resultpage" suddenly stopped working

Post by Dr.CSS »

Hmm your right yours doesn't work, mine is working fine...

Try putting it in the template...
beattie
Forum Members
Forum Members
Posts: 98
Joined: Sun Dec 21, 2008 11:35 pm

Re: Search "resultpage" suddenly stopped working

Post by beattie »

OK, I've tried removing the {search} tag from the global content block and putting it into the page template. No good.

I've tried putting the tag directly into the content field box of a new page called test, see here: http://www.smudgedesign.com.au/japan/index.php?page=test. It still displays the search results from the home page. It is clearly sending the user to the default page and ignoring the resultpage="results" parameter.

I am totally baffled :-\ This is the code in the content field of the test page:

Code: Select all

{search searchtext="" submit="Search" resultpage="results"}
The results page is http://www.smudgedesign.com.au/japan/index.php?page=results
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12710
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Search "resultpage" suddenly stopped working

Post by Dr.CSS »

I'm using {search resultpage="results"} and it works fine...
beattie
Forum Members
Forum Members
Posts: 98
Joined: Sun Dec 21, 2008 11:35 pm

Re: Search "resultpage" suddenly stopped working

Post by beattie »

Just tried {search resultpage="results"}, didn't work... have tried uninstalling and reinstalling search module... no success... have restored templates to default, no luck... am running out of ideas..
beattie
Forum Members
Forum Members
Posts: 98
Joined: Sun Dec 21, 2008 11:35 pm

Re: Search "resultpage" suddenly stopped working

Post by beattie »

I'm hoping that, maybe, when I migrate the site to the new server, this problem will resolve itself. :-\
beattie
Forum Members
Forum Members
Posts: 98
Joined: Sun Dec 21, 2008 11:35 pm

Re: Search "resultpage" suddenly stopped working

Post by beattie »

OK, I think I might be getting closer to solving the problem. I notice that when I perform a search, the url in the browser looks like this:
First it has the 'search results' page ID 92, followed by the 'home page' ID 15 ... hmm... this must mean that it's trying to follow the resultpage parameter orders but then being redirected to the home page. This seems like a big clue but I'm not technical enough to understand what could be causing this redirection. Could the answer be in the source code which seems to confirm my suspicions?






    Search: 

User avatar
Dr.CSS
Moderator
Moderator
Posts: 12710
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Search "resultpage" suddenly stopped working

Post by Dr.CSS »

Hmm Have you tried clearing the site cache, site admin > global settings...

And maybe FTP to site and remove all but the index.html from tmp/template_c...
beattie
Forum Members
Forum Members
Posts: 98
Joined: Sun Dec 21, 2008 11:35 pm

Re: Search "resultpage" suddenly stopped working

Post by beattie »

Have tried what you suggested, cleared cache in global settings and deleted tmp/template_c files, unfortunately no success. Just noticed that the checksum test returns this error:
Undefined offset: 1 in /home/public_html/japan/admin/checksum.php on line 93
Wonder if it's anything to do with it...
Post Reply

Return to “Modules/Add-Ons”