Search "resultpage" suddenly stopped working
Search "resultpage" suddenly stopped working
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?
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
Clould you post a url tot the site or provide the code you used.
Re: Search "resultpage" suddenly stopped working
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:
This is the results template code:
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!
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}
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}
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!
-
- Power Poster
- Posts: 424
- Joined: Sat Feb 02, 2008 12:42 am
- Location: USA
Re: Search "resultpage" suddenly stopped working
I just tested and it worked for me. Results showed in the 'Search Result' page.
Take a penny, leave a penny.
Re: Search "resultpage" suddenly stopped working
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
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
Hmm your right yours doesn't work, mine is working fine...
Try putting it in the template...
Try putting it in the template...
Re: Search "resultpage" suddenly stopped working
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:
The results page is http://www.smudgedesign.com.au/japan/index.php?page=results
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"}
Re: Search "resultpage" suddenly stopped working
I'm using {search resultpage="results"} and it works fine...
Re: Search "resultpage" suddenly stopped working
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
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
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
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...
And maybe FTP to site and remove all but the index.html from tmp/template_c...
Re: Search "resultpage" suddenly stopped working
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:
Wonder if it's anything to do with it...Undefined offset: 1 in /home/public_html/japan/admin/checksum.php on line 93