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.

Template Warnings

May 10, 2011 3:34am

Subscribe [3]
  • #1 / May 10, 2011 3:34am

    grrramps

    2219 posts

    I’m getting a Template Warning in EE 2.1.3 (latest) when saving a template.

    {exp:search …
    No closing tag found. Note: some tags do not require closing.
    Please consult the module's documentation if you experience problems.

    Here's the search code:

    {exp:search:search_results switch="resultRowOne|resultRowTwo"}
    <tr>
    <td class="{switch}" width="26%" valign="top"><strong><a href="http://{auto_path}" rel="nofollow" title="Link to: {title} - {blurb}" class="TipTipClass">{title}</a></strong></td>
    <td class="{switch}" width="50%" valign="top">{excerpt}</td>
    <td class="{switch}" width="12%" valign="top">{author}</td>
    <td class="{switch}" width="12%" valign="top">{entry_date format="%M %j, %Y"}</td>
    </tr>
    {/exp:search:search_results}

    Looks to me as though the tag is closed. The page functions properly.

    Is there anything really wrong?

  • #2 / May 10, 2011 1:11pm

    Lisa Wess

    20502 posts

    Hi, grrramps -

    Are you using the search keywords tag? It’s a single variable and it will trigger that error.

    Also, that is the full content of the error? It should tell you the exact tag it’s unhappy with.

    Thanks!

  • #3 / May 10, 2011 1:36pm

    grrramps

    2219 posts

    Are you using the search keywords tag? It’s a single variable and it will trigger that error.

    Yes. Both the search keywords tag and the search total results tag.

    Also, that is the full content of the error? It should tell you the exact tag it’s unhappy with.

    I’ve enclosed an image of the template error message. That’s what it shows—a truncated name.

  • #4 / May 11, 2011 2:42pm

    Sue Crocker

    26054 posts

    Hi, Ron.

    I can’t replicate the problem in a new template with EE 2.1.4 beta. I’m assuming you have more in your template than the code you listed..

    Can you reduce the template’s complexity to troubleshoot?

  • #5 / May 11, 2011 3:04pm

    grrramps

    2219 posts

    I can’t replicate the problem in a new template with EE 2.1.4 beta. I’m assuming you have more in your template than the code you listed.

    Not much more. It’s basic search results:

    {embed="{mysite-search}/head"}
    <title>Search Results</title>
    </head>
    <body id="results">
    {embed="{mysite-template-group}/logo-leaderboard"}
    <div id="centerframe">
    <div class="centerframe_bg">
    <div id="content">
    <div class='header'></div>
    <table class='breadcrumb' border='0' cellpadding='0' cellspacing='0' width='99%'>
    <tr>
    <td width="30%"><span class="defaultBold">  <a href="http://{homepage}" rel="nofollow" title="Back to the Home Page" class="TipTipClass">{site_name}</a> ›  <a href="http://{path=search/index}" rel="nofollow" title="Back to the Search Page" class="TipTipClass">Power Search</a> ›  {lang:search_results}</span></td>
    <td width="50%" align="left"><span class="defaultBold">{lang:keywords}: <em>{exp:search:keywords}</em></span></td>
    <td width="20%" 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>
    </tr>
    {exp:search:search_results switch="resultRowOne|resultRowTwo"}
    <tr>
    <td class="{switch}" width="26%" valign="top"><strong><a href="http://{auto_path}" rel="nofollow" title="Link to: {title} - {blurb}" class="TipTipClass">{title}</a></strong></td>
    <td class="{switch}" width="50%" valign="top">{excerpt}</td>
    <td class="{switch}" width="12%" valign="top">{author}</td>
    <td class="{switch}" width="12%" valign="top">{entry_date format="%M %j, %Y"}</td>
    </tr>
    {/exp:search:search_results}
    </table>
    {if paginate}
    <div class="paginate">
    {page_count}  {paginate}
    </div>
    {/if}
    </div>
    {embed="{mysite-template-group}/search_block_results"}
    </div>
    </div>
    </div><!--END centerframe bg-->
    </div><!--END centerframe-->
    {embed="{mysite-template-group}/copyright"}
    </body> 
    </html>

    Can you reduce the template’s complexity to troubleshoot?

    Not without a little surgery. The page functions properly in the latest 2.1.3 (which seemed to have fixed a search results bug in previous versions).

    I’ll give it a try in 2.1.4 when it’s out of beta.

  • #6 / May 12, 2011 5:46pm

    Sue Crocker

    26054 posts

    I can replicate the problem in 2.1.5 beta, with the code for the tables all mixed in.

    If I delete that first table, it’s OK.

    I got this to work:

    <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>
    </tr>
    {exp:search:search_results switch="resultRowOne|resultRowTwo"}
    <tr>
    <td class="{switch}" width="26%" valign="top"><strong><a href="http://{auto_path}" rel="nofollow" title="Link to: {title} - {blurb}" class="TipTipClass">{title}</a></strong></td>
    <td class="{switch}" width="50%" valign="top">{excerpt}</td>
    <td class="{switch}" width="12%" valign="top">{author}</td>
    <td class="{switch}" width="12%" valign="top">{entry_date format="%M %j, %Y"}</td>
    </tr>
    {/exp:search:search_results}
    </table>
  • #7 / May 12, 2011 6:04pm

    grrramps

    2219 posts

    That first table is sorta useful, of course. So, is this a bug? Or, are these tags no longer supported?

    {exp:search:keywords}
    {exp:search:total_results}
  • #8 / May 12, 2011 8:12pm

    Sue Crocker

    26054 posts

    {exp:search:keywords}

    will generate the error, but it’s a bogus one since that’s a single tag.

    No closing tag found. Note: some tags do not require closing.

  • #9 / May 12, 2011 8:27pm

    grrramps

    2219 posts

    Seems to me that EE should know which tags don’t need closing so it won’t issue a closing tag error for a tag that doesn’t need to be closed.

    😉

  • #10 / May 13, 2011 1:36pm

    Sue Crocker

    26054 posts

    Agreed, mentioning it to the dev team now. 😊 If they say it’s a bug, I’ll mark it as one. Or failing that, you could make a Feature Request.

  • #11 / May 13, 2011 2:09pm

    grrramps

    2219 posts

    If they say it’s a bug, I’ll mark it as one. Or failing that, you could make a Feature Request.

    That brings back memories of past development projects.

    1) It’s not a bug, it’s an undocumented feature.

    2) It’s not a bug until someone requests it as a feature.

  • #12 / May 13, 2011 3:17pm

    Brandon Jones

    5500 posts

    Hi grrramps,

    It wouldn’t be too difficult to whitelist EE’s own tags, but whitelisting all single third-party tags isn’t really feasible. Still, a feature request for the former would be reasonable. Thanks, and going ahead and closing this one out.

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

ExpressionEngine News!

#eecms, #events, #releases