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.

Problem with search

June 04, 2008 2:26pm

Subscribe [4]
  • #1 / Jun 04, 2008 2:26pm

    Steve D

    11 posts

    Something’s garfed in my search results page here.  I get ‘Invalid URI’ for any results I click on.

    I’ve never changed this template - have used it for years but I don’t know when it stopped working correctly.

    Any suggestions?

    Template code below:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{lang}" lang="{lang}"> 
    
    <head>
    <title>{lang:search}</title>
    
    <meta http-equiv="content-type" content="text/html; charset={charset}" />
    
    <link rel='stylesheet' type='text/css' media='all' href='{stylesheet=search/search_css}' /> 
    <style type='text/css' media='screen'>@import "{stylesheet=search/search_css}";</style>
    
    </head>
    <body>
    
    <div id="content">
    <div class='header'><h1>{lang:search_results}</h1></div>
    
    <table class='breadcrumb' border='0' cellpadding='0' cellspacing='0' width='99%'>
    <tr>
    <td><span class="defaultBold">  <a href="http://{homepage}">{site_name}</a> ›  <a href="http://{path=search/index}">{lang:search}</a> ›  {lang:search_results}</span></td>
    <td align="right"><span class="defaultBold">{lang:total_search_results} {exp:search:total_results}</span></td>
    </tr>
    </table>
    
    <div class='outerBorder'>
    <div class='tablePad'>
    
    <table border="0" cellpadding="6" cellspacing="1" width="100%">
    <tr>
    <td class="resultHead">{lang:title}</td>
    <td class="resultHead">{lang:excerpt}</td>
    <td class="resultHead">{lang:author}</td>
    <td class="resultHead">{lang:date}</td>
    <td class="resultHead">{lang:total_comments}</td>
    <td class="resultHead">{lang:recent_comments}</td>
    </tr>
    
    {exp:search:search_results switch="resultRowOne|resultRowTwo"}
    
    <tr>
    <td class="{switch}" width="30%" valign="top"><b><a href="http://{path}">{title}</a></b></td>
    <td class="{switch}" width="30%" valign="top">{excerpt}</td>
    <td class="{switch}" width="10%" valign="top"><a href="http://{member_path=member/index}">{author}</a></td>
    <td class="{switch}" width="10%" valign="top">{entry_date format="%m/%d/%y"}</td>
    <td class="{switch}" width="10%" valign="top">{comment_total}</td>
    <td class="{switch}" width="10%" valign="top">{recent_comment_date format="%m/%d/%y"}</td>
    </tr>
    
    {/exp:search:search_results}
    
    </table>
    
    
    {if paginate}
    
    <div class='paginate'>
    
    <span class='pagecount'>{page_count}</span>  {paginate}
    
    </div>
    
    {/if}
    
    
    </td>
    </tr>
    </table>
    
    <div class='copyright'><a href="http://www.pmachine.com/">Powered by ExpressionEngine</a></div>
    
    </div>
    </div>
    </div>
    
    </body> 
    </html>
  • #2 / Jun 04, 2008 3:13pm

    andculture

    24 posts

    Steve,

    You’re problem is with your HREF path. It’s incorrect. You currently have:

    <td class="{switch}" width="30%" valign="top"><b><a href="http://{path}">{title}</a></b></td>

    Try this instead:

    <td class="{switch}" width="30%" valign="top"><b><a href="http://{title_permalink={template_group}/post-entry-page-title}">{title}</a></b></td>

    If you want to use the “{path}” parameter, you could do something like this:

    <a href="http://{path={template_group}/page_title}">{title}</a>

    Either way, you have to point the system where it should go.

  • #3 / Jun 04, 2008 4:02pm

    Steve D

    11 posts

    Thanks.  I just replaced the whole template and now it works again…

  • #4 / Jun 04, 2008 4:06pm

    Ingmar

    29245 posts

    That’s good to know 😊

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

ExpressionEngine News!

#eecms, #events, #releases