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.

simple search form not returning search results

November 04, 2011 1:20pm

Subscribe [2]
  • #1 / Nov 04, 2011 1:20pm

    EJ Fan

    4 posts

    Hello,

    I’ve been trying to add a simple search form. Every time I submit a search, I get directed to an error page with a gray box saying either that my search did not return any results, or that the action I requested is invalid. The code is below:

    {exp:search:simple_form channel="news|pages" search_in="everywhere"}
        <input type="text" name="keywords" value="" />
        <input type="submit" id="search-submit" value="Go" />
       {/exp:search:simple_form}

    I noticed that the URL doesn’t change when I submit the search too. However, when I checked the search log in the CP, it does seem to be logging the terms I’m searching.

    Any ideas what might be wrong?

    Thanks!

     

  • #2 / Nov 04, 2011 1:39pm

    EJ Fan

    4 posts

    Been doing more digging and I came across this post:
    http://ellislab.com/forums/viewthread/182490/

    I’m working with the same tutorial, and despite the suggestions from that thread (adding in statuses), I’m still getting the same error. All the channel fields are set to searchable too—I double checked to make sure.

  • #3 / Nov 07, 2011 8:20am

    Sue Crocker

    26054 posts

    Hi, EJ Fan.

    Let’s have you make a few minor changes to your simple search form.

    {exp:search:simple_form channel="news|pages" search_in="everywhere" where="all" status="not closed"}
        <input type="text" name="keywords" value="" />
        <input type="submit" id="search-submit" value="Go" />
       {/exp:search:simple_form}

    Does that help?

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

ExpressionEngine News!

#eecms, #events, #releases