ee v2.9.2 low search v4.4.0

The code below is generating an error:

You have an invalid conditional in your template. Please review your conditionals for an unclosed string, invalid operators, a missing }, or a missing {/if}.

Parser State: Unexpected end of Template “image-database/results” on line 93; expected ENDIF tag for opening on line 91.

Removing the {low_search:results} tags, the error goes away.

Removing the {if no_results} conditional, the error goes away.

Removing the {if count ==1} conditional, the error goes away.

Removing the {if category_is_parent == 0} conditional, the error goes away.

Removing the {nsm_categories:archive tags}, the error remains.

    {if no_results}
            category_group="8" depth="2"
            {if count ==  1}abc{/if}
                {if category_is_parent != 0}
                {if category_is_parent == 0}
                    {if count ==  1}yes{if:else}no{/if}
            {if count == total_results}xyz{/if}

I am convinced the issue with Low Search but I am not an expert.

Any help is appreciated!

1 Answer 1


Actually, I doubt this is a Low Search issue.

If the problem persists if you change the exp:low_search:results tag to a exp:channel:entries tag, then the issue is definitely not related to LS. Can you check if this is the case?

You can also try and use {if low_search_no_results} rather than {if no_results}, to see if that makes a difference. It's probably due to unexpected nesting that the error is thrown.

You can even try and move the code inside the no_results conditional into an embed and see if it works that way.

Side note: you're targeting a single collection, so using orderby_sort="low_search_collection:image-gallery" is not necessary. You can safely remove that parameter.

  • The problem does persist when I change exp:low_search:results tag to a exp:channel:entries tag.
    – hfrancke
    Oct 4, 2015 at 12:23
  • The problem persists if I use 'if low_search_no_results'.
    – hfrancke
    Oct 4, 2015 at 12:26
  • I didn't try the embed. (I ended up with a work around because I wanted a different UX.)
    – hfrancke
    Oct 4, 2015 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.