ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Can't get search results to display

July 15, 2010 6:07pm

Subscribe [4]
  • #1 / Jul 15, 2010 6:07pm

    Deelicious

    86 posts

    I’m having difficulties display search results after entering a keyword into a simple search box. I have a template group named “search” with a template called “results” containing the generic code provided in the docs. I’ve also changed the weblog search url address accordingly in the Admin section of my weblog. When I enter a keyword and click submit, it just kicks me back to my home page, it never goes to the search results url.

    I’m using a custom index.php page called index-ee.php because the site is in development on a server with an existing site so I can’t use index.php for the main directory. Is it not possible to have search results work if the index.php name is different?

    Or what could I be doing incorrectly? Thanks.

  • #2 / Jul 15, 2010 8:26pm

    Brandon Jones

    5500 posts

    Deelicious,

    1. To clarify, you are rewriting your URLs via .htaccess?
    2. Has this ever worked before?
    3. Which version and build of EE is this with?

  • #3 / Jul 16, 2010 12:03am

    Deelicious

    86 posts

    Thanks for the help Brandon. To answer your questions:

    1. No I am not using .htaccess rewrite. When I installed EE I renamed the index.php page to index-ee.php and installed it using index-ee.php when asked the name of the index page.

    2. The entire site functions properly, but I’ve never used the search module before this attempt.

    3. Version 1.6.8 Build 20090723

  • #4 / Jul 16, 2010 2:58am

    John Henry Donovan

    12339 posts

    Deelicious,

    Can we see your simple search box template code please?

    What happens if you try and visit your search results template directly?

  • #5 / Aug 02, 2010 12:35am

    Deelicious

    86 posts

    Sorry I didn’t get a notification you responded!

    Here’s the code:

    {exp:search:simple_form weblog="blog"}
    <input type="text" name="keywords" value="">
    <input type="submit" value="Search" class="submit" /></p>
    {/exp:search:simple_form}

    If I access the results page directly it gives the generic messages “Your search did not return any results.”

    By the way, I’ve now launched the website with index.php and I still can’t get the search to redirect to the results page.

  • #6 / Aug 02, 2010 2:43am

    John Henry Donovan

    12339 posts

    Deelicious,

    Try adding a result_page parameter for your custom results page and let us know if that works for you.

    {exp:search:simple_form weblog="blog" result_page="search/results"}
    <input type="text" name="keywords" value="">
    <input type="submit" value="Search" class="submit" /></p>
    {/exp:search:simple_form}
  • #7 / Aug 02, 2010 11:28am

    Deelicious

    86 posts

    Thanks for the suggestion John, but adding the parameter didn’t work. Just to clarify, I have a template group called “search” with a page called “results”. I deleted the original search group, so I’m hoping this is the correct names for these items. I also copied the code in the docs for the results page.

  • #8 / Aug 02, 2010 6:48pm

    Brandon Jones

    5500 posts

    Deelicious, are you able to upgrade to 1.6.9?

  • #9 / Aug 03, 2010 3:43pm

    Deelicious

    86 posts

    Yup, just upgraded to 1.6.9, still giving me the same issues.

  • #10 / Aug 04, 2010 3:25am

    John Henry Donovan

    12339 posts

    Deelicious,

    Can you share a link to your website so we can have a look?

  • #11 / Aug 04, 2010 3:56am

    Deelicious

    86 posts

    Just PM’d you. Thanks!

  • #12 / Aug 04, 2010 6:32am

    John Henry Donovan

    12339 posts

    Deelicious,

    What extensions do you have installed?

  • #13 / Aug 05, 2010 1:21am

    Deelicious

    86 posts

    None.

  • #14 / Aug 05, 2010 2:01am

    Lisa Wess

    20502 posts

    Hi, Deelicious - it looks like you are forcing the addition of “www” in the URL - if you stop doing that, does your search work?  This type of redirection is a common reason for this symptom.

  • #15 / Aug 05, 2010 3:16pm

    Deelicious

    86 posts

    I removed the www redirect in my .htaccess file and that did the trick! Thanks for the continual support John and Lisa!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases