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.

Warning: Invalid EE Conditional Variable: {if ""}... - from search results page

April 06, 2010 2:43pm

Subscribe [4]
  • #1 / Apr 06, 2010 2:43pm

    ByteMyPixel

    41 posts

    I’m getting the below error via following links from my search results page (temp site location)

    For example, when I search for the term “contact” I get a result for the contact us page, when I follow that link, I get the error…

    Warning: Invalid EE Conditional Variable: {if "Contact Us"} in /home/account/public_html/admin/core/core.functions.php on line 2773

    I do not have this conditional in my search-results template, nor on my contact-us template.

    Any thoughts?

  • #2 / Apr 06, 2010 3:21pm

    Ingmar

    29245 posts

    What version and build of EE are you on? Any third-party extensions?

  • #3 / Apr 06, 2010 3:27pm

    ByteMyPixel

    41 posts

    Oh yes - I should know better 😊

    EE 1.6.8

    Add-ons/Extensions/Plug-ins/etc:

    FreeForm
    Fresh Variables
    LG .htaccess Generator
    LG Better Meta
    FieldFrame
    jQuery for the Control Panel
    SL MailChimp Subscribe
    Gypsy
    Category Checkboxes
    Required Category Extension
    HTML Stripper
    Word Limiter Plus
    Image Sizer
    Search Hilighter

    I think that’s it…

    Thanks for the reply!

  • #4 / Apr 06, 2010 4:15pm

    Ingmar

    29245 posts

    Ar you on the latest build? Can you show us the relevant parts of your template? Perhaps a link?

  • #5 / Apr 06, 2010 4:36pm

    ByteMyPixel

    41 posts

    I’m on 1.6.8

    Link to temp site: http://www.rezstreamwebdev1.com/

    Relevant “Search-Result” Template Code:

    {exp:search:search_results status="not closed"}
    {exp:search_hilite}
    <div class="entry">
    <h2><a href="http://{comment_auto_path}">{title}</a></h2>
    <p>{exp:word_limit_plus if_exceeds="60" stop_after="40"}{exp:html_strip}{content_body_gypsy}{/exp:html_strip}{/exp:word_limit_plus} <br />
    </div><!--end entry--><br />
    {/exp:search_hilite}<br />
    {/exp:search:search_results}

    Relevant “Contact Us” Template Code:

    {exp:weblog:entries weblog="{parent_section}" entry_id="{parent_entry_id}" disable="categories|category_fields|member_data|trackbacks|pagination"}
    {exp:search_hilite}
    <div id="page-title">{if custom_pagetitle_gypsy }{custom_pagetitle_gypsy}{if:else}{title}{/if}</div>
    {if h1_gypsy}<h1>{h1_gypsy}</h1>{/if}
    {content_body_gypsy}
    {/exp:search_hilite}
    {if logged_in}{global_edit_link}{/if}
    {/exp:weblog:entries}

    Thanks again!

  • #6 / Apr 06, 2010 8:27pm

    Brandon Jones

    5500 posts

    Hi ByteMyPixel,

    1. Can you also verify the build number (very bottom of the CP)?
    2. Please try a new set of templates with the bare minimum search code (no highlighting or Gypsy-related tags, etc). Let’s start with the basics and see if the problem still exists.

  • #7 / Apr 07, 2010 4:25pm

    ByteMyPixel

    41 posts

    Aha! Yes here it is - Build: 20090723

    I will try that and get back to you!  Thank you so much for your help 😊

  • #8 / Apr 07, 2010 4:28pm

    Ingmar

    29245 posts

    Very good, we’ll be here. You also might want to upgrade to the latest build in the process, just to rule out file corruption.

  • #9 / Apr 09, 2010 2:20pm

    ByteMyPixel

    41 posts

    Hi Brandon, Ingmar,

    Thank you both for your responses and help with this!

    I upgraded to the latest build, and have also tried with new simplified templates; while it didn’t fix the issue, I did discover something else - this only occurs when I’m logged in. 

    Strange it is… at least visitors won’t get the error 😊

  • #10 / Apr 09, 2010 5:15pm

    Sue Crocker

    26054 posts

    The reason that visitors won’t see the error is because your settings aren’t showing the errors to them.

    Can you simplify even more?

    {if h1_gypsy}<h1>{h1_gypsy}</h1>{/if}

    It looks like this may be what is going wrong, is that it?

  • #11 / Apr 09, 2010 7:24pm

    ByteMyPixel

    41 posts

    Hi Sue,

    That seems to be it!!! 

    Can you explain to me why this might be?  The error only occurs when following links from the search-results template? 

    Thank you so much!

  • #12 / Apr 09, 2010 9:25pm

    Brandon Jones

    5500 posts

    To clarify, you’re saying you don’t get errors after removing all the gypsy-related tags?  If that’s the case, we don’t have control over the Gypsy plug-in; you’d need to get in touch with the author on that.

    Keep us posted!

  • #13 / Apr 12, 2010 11:17am

    ByteMyPixel

    41 posts

    Hi Brandon,

    That is correct, I don’t get the error if I remove the gypsy related tags. 

    When I tried removing everything but the very basics from the template before, I was still seeing the error, I believe, because it was cached.

    Thanks everyone for your patience and help with this!

  • #14 / Apr 12, 2010 12:01pm

    Sue Crocker

    26054 posts

    We’ll let you take up the remaining issues with Brandon Kelly. Don’t hesitate to post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases