Page 1 of 2

Search "resultpage" suddenly stopped working

Posted: Wed Dec 31, 2008 11:50 am
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?  ???

Re: Search "resultpage" suddenly stopped working

Posted: Wed Dec 31, 2008 1:18 pm
by ID2020
Clould you post a url tot the site or provide the code you used.

Re: Search "resultpage" suddenly stopped working

Posted: Wed Dec 31, 2008 8:57 pm
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!

Re: Search "resultpage" suddenly stopped working

Posted: Thu Jan 01, 2009 9:23 pm
by beattie
anybody?

Re: Search "resultpage" suddenly stopped working

Posted: Thu Jan 01, 2009 9:36 pm
by Ziggywigged
I just tested and it worked for me. Results showed in the 'Search Result' page.

Re: Search "resultpage" suddenly stopped working

Posted: Fri Jan 02, 2009 12:59 am
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)?...

Re: Search "resultpage" suddenly stopped working

Posted: Sat Jan 03, 2009 9:52 am
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  :)

Re: Search "resultpage" suddenly stopped working

Posted: Sat Jan 03, 2009 6:27 pm
by Dr.CSS
Hmm your right yours doesn't work, mine is working fine...

Try putting it in the template...

Re: Search "resultpage" suddenly stopped working

Posted: Sat Jan 03, 2009 9:43 pm
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

Re: Search "resultpage" suddenly stopped working

Posted: Sun Jan 04, 2009 12:01 am
by Dr.CSS
I'm using {search resultpage="results"} and it works fine...

Re: Search "resultpage" suddenly stopped working

Posted: Sun Jan 04, 2009 2:48 am
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..

Re: Search "resultpage" suddenly stopped working

Posted: Sun Jan 04, 2009 3:23 am
by beattie
I'm hoping that, maybe, when I migrate the site to the new server, this problem will resolve itself. :-\

Re: Search "resultpage" suddenly stopped working

Posted: Sun Jan 04, 2009 3:47 am
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: 


Re: Search "resultpage" suddenly stopped working

Posted: Sun Jan 04, 2009 7:14 am
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...

Re: Search "resultpage" suddenly stopped working

Posted: Sun Jan 04, 2009 7:52 am
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...