All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Low Search Error for Some Keywords

Stoyan Vasilev 2 Jul 2013 21:52 problem, complete

Hey,

We are getting the PHP error below when we type in certain words in the search. For example, typing "government" returns valid results, typing "bananas" returns a valid "no results" view but typing "turkey" returns the error below.

Parse error: syntax error, unexpected 'show_group' (T_STRING) in /var/www/vhosts/urbanizationproject.org/httpdocs/engine/expressionengine/libraries/Functions.php(679) : eval()'d code on line 79

The URL for our staging site is http://70.32.109.74/ and this happens when typing in the keywords in the Search form in the header.

Thanks.

Replies

  1. Low 3 Jul 2013 07:26

    That looks like a problem with an advanced conditional.

    What's your template code for the search results template? Use http://pastie.org for large chunks of text.

  2. Stoyan Vasilev 3 Jul 2013 15:42

    Hey,

    There's nothing too crazy in the template I think. Here is the pastie:
    http://pastie.org/private/a1y7qlrpvod...

    Thanks!
    St

  3. Stoyan Vasilev 3 Jul 2013 15:45

    And the pagination snippet looks like this: http://pastie.org/private/5rwvznwvhau...

  4. Low 3 Jul 2013 15:51

    Hmm, can't see anything out of the ordinary in the template code or snippet, yet I'm sure the error is caused by a malformed advanced conditional somewhere... It might be somewhere in the embeds as well.

    First things first, I saw that you can optimize your Form a bit. You're only using a single category filter, so you don't need the group syntax for that. Neither do you need the multi-valued name in the select. Your category select can therefore look like this:

    <select name="category"> 
    <option value="">Select Initiative</option>
    {exp:channel:categories channel="blog" style="linear" category_group="1"}
    <option value="{category_id}"{if category_id == "{low_search_category}"} selected{/if}>{category_name}</option>
    {/exp:channel:categories}
    </select>


    I don't think it's related to the error, however. If you send me SuperAdmin login credentials, I can help you locate the culprit. Send the info to hi at gotolow dot com.

  5. Stoyan Vasilev 3 Jul 2013 16:14

    Thanks.

    I just emailed it. Please note that the code is versioned via GIT (and deployed via Beanstalk) so you have to let me know about any changes that you make -- so that I can put it in the code base instead of them being overwritten during the next deployment.

    St

  6. Low 4 Jul 2013 06:20

    Turned out it was a problem with some advanced conditionals that contained BW Category Count vars. Removing those for something else solved the issue.