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.

Search result links broken

August 11, 2009 12:31pm

Subscribe [3]
  • #1 / Aug 11, 2009 12:31pm

    pugnax

    12 posts

    I have a site where I have revamped/moved some sections and now when people search, they sometimes come up with results that point to information at its old location. That is, some search results are broken links. Is there a way to flush the cache for the search in EE? I saw the page here that may help (do I just clear the database cache files?):

    http://expressionengine.com/docs/cp/admin/utilities/clear_cached_data_files.html

    Example: enter “Refugee” in the search box on:

    http://globalhealth.duke.edu/

    and click on the last item in the results list.

    Thanks for any help!

  • #2 / Aug 11, 2009 12:59pm

    Mark Bowen

    12637 posts

    Might it just be that you need to update your weblog settings located at :

    Admin->Weblog Administration->Weblog Management->Edit Preferences (Your Weblog)->Path Settings->Search Results URL

    See if those are set correctly and if not then update them and hopefully that will help a bit.

    Best wishes,

    Mark

  • #3 / Aug 11, 2009 4:23pm

    Ingmar

    29245 posts

    As Mark suggested, all you might have to do is provide the correct search results URL for those weblogs where it’s not working. Let us know if that helps, please.

  • #4 / Aug 11, 2009 4:27pm

    pugnax

    12 posts

    Thanks. How do I obtain the right search results URL? I though each page we have on our web site has a unique URL string, so I am unsure how that will help out. We have multiple web logs and I see that none have that field filled in. I have only been using EE for about 4 months now, so I am new at this. Thanks.

  • #5 / Aug 11, 2009 4:31pm

    Ingmar

    29245 posts

    How are you linking to your search results? Every weblog needs to provide a return URL (usually using a single entry template) that search results can link to.

  • #6 / Aug 11, 2009 4:54pm

    pugnax

    12 posts

    I now see that the designer created a search “results” template. And this is the main content area of that template:

    <!-- content column -->
    <td valign="top">
    <div id="contentbox">
    <div id="content" class="search">
        <h1>Search Results</h1>
        
        {exp:search:search_results}
    
            <h3><a href="http://{embed=">{title}</a></h3>
    <p>        {excerpt}<br />
        <br />
        {/exp:search:search_results}<br />
        <br />
    </div> <!-- end content div --><br />
    </div> <!-- end contentbox div --><br />
    </td>

    So guess I have to look into what “{exp:search:search_results}” does?

    Thanks.

  • #7 / Aug 11, 2009 4:59pm

    Ingmar

    29245 posts

    Take a look at the docs. The {auto_path} variable should be of particular interest.

  • #8 / Aug 11, 2009 5:13pm

    pugnax

    12 posts

    I’m still lost. Do I now need to add the {auto_path} variable? I thought their might be a way to have the system re index the site so all search results are kosher.

    Like in the broken one in my above example had a page that used to be located at:

    http://globalhealth.duke.edu/past-fieldwork-experiences

    I revamped the whole section of the site and that page now lives at:

    http://globalhealth.duke.edu/dghi-fieldwork/past-projects

    Here’s where I am bumping into my limit of code knowledge. I am a designer and usability person and when I get too far into code, my eyes start to bleed (comes from my dad’s side).

  • #9 / Aug 11, 2009 5:22pm

    Ingmar

    29245 posts

    Yes, my suggestion would be to make use of the {auto_path} variable. There’s no need to re-index the site, all search results are always generated dynamically when needed. That said, EE needs to know where to link to, and needs to be configured accordingly.

  • #10 / Aug 12, 2009 10:28am

    pugnax

    12 posts

    Great. I have all I need. Thanks to you both!

  • #11 / Aug 12, 2009 10:45am

    Ingmar

    29245 posts

    I am truly glad to hear that. If you need further help, simply start a new thread, please.

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

ExpressionEngine News!

#eecms, #events, #releases