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 Issue

February 16, 2009 7:17am

Subscribe [2]
  • #1 / Feb 16, 2009 7:17am

    sosolatin

    10 posts

    This question may be related to a resolved thread.

    Hey Guys,

    Similar question to the above - My simple search is currently not working and I am not sure why. It was originally working, but has since stopped :gulp:

    this is the code on the search module:

    <div id="search-module">
              <a href="http://iabaustralia.gabrieltamborini.com.au/images/searchtitle.jpg">http://iabaustralia.gabrieltamborini.com.au/images/searchtitle.jpg</a>
              {exp:search:simple_form no_result_page="search/noresults" status="open|closed" result_page="search/results" search_in="everywhere"}
                   <input class="search-textfield" type="text" name="keywords" />
                   <button type="submit" id="search-button" class="submit"></button>
              {/exp:search:simple_form}
         </div>

    And here is the code on the results page:

    {exp:search:search_results}
              <div id="main-event">
                   <h2><a href="http://{auto_path}">{title}</a></h2>
    <p>               <div id="story-date">Published: {entry_date format="%d%S %M, %Y"}</div><br />
                   <div id="story-link"><a href="http://{auto_path}">find out more</a></div><br />
                   {excerpt}<br />
              </div><br />
         {/exp:search:search_results}

    Any insights would be great please!

  • #2 / Feb 16, 2009 7:18am

    sosolatin

    10 posts

    sorry - the search works, but the linking through to the articles from the results page won’t.

  • #3 / Feb 16, 2009 3:46pm

    Ingmar

    29245 posts

    Do you’ve got a link to the site? What version and build of EE are you on? If you say, it’s worked before, what did you change? Or perhaps on the hosting side of things some changes were made?

  • #4 / Feb 16, 2009 7:13pm

    sosolatin

    10 posts

    Sent through the url in private message. EE 1.6.6.

    I tested the search when I first set up the site and it was working fine.

    There hasn’t been any hosting changes (although there will be - it will move to its live home soon).

    There was only one change I have made.

    I was having issues getting pagination to work inside pages with multiple weblogs, so have replaced line 1261 in mod.weblog.php from:

    if (preg_match("#^P(\d+)|/P(\d+)#", $qstring, $match) AND $dynamic)

    To this:

    if (preg_match("#^P(\d+)|/P(\d+)#", $qstring, $match))

    That shouldn’t be affecting the search though.

  • #5 / Feb 16, 2009 8:42pm

    Greg Aker

    6022 posts

    Make sure your paths are set correctly for each weblog at:  CP Home ›  Admin ›  Weblog Administration ›  Weblog Management ›  Edit Weblog Preferences ›  Path Settings, specifically the:  Search Results URL

    -greg

  • #6 / Feb 17, 2009 6:00pm

    sosolatin

    10 posts

    ok - so I went through and added the URL to the search results page in the weblog preferences but now when I click on the articles appearing in the search from those weblogs, I’m getting a 404 error page.

    e.g - type ‘online’ in the search module, then when the results appear, select the article called ‘15th Annual AIMIA Awards’.

  • #7 / Feb 17, 2009 7:10pm

    Lisa Wess

    20502 posts

    Your search results URL is pointing to index.php, you need to include the template group and template you use to show your “single entry” pages.  So you need to add /news/story/

  • #8 / Feb 17, 2009 9:11pm

    sosolatin

    10 posts

    Thanks Lisa,

    Tried that however they still bring a 404 error - The weblog for news stories and events has been changed to goto their correct templates, and they give a 404.

    So for example - when a user clicks on the news articles from the search, the News weblog search results url in the path settings is:
    http://urlpath/news/story

    But when you click on these, it gives you a 404.

  • #9 / Feb 17, 2009 9:15pm

    sosolatin

    10 posts

    an example of this occurance is the story “Down to the tie-breaker but Tomb Raiding takes New Dialogue to the top of Creative Showcase Round 2” which should appear if you search for it.

  • #10 / Feb 17, 2009 9:16pm

    Greg Aker

    6022 posts

    are you removing index.php from your URLs?  You probably need to tweak your rewrite.  But for the time being, please put it back in so we can test this.

    THank you,

    -greg

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

ExpressionEngine News!

#eecms, #events, #releases