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

Support archive

Low Search: Odd behaviour on site/index

aurorameida 25 Sep 2013 10:43 problem, rejected

Hi ya Mr Low,

I've been tweaking a site using your fantastic search. I've hit a bit of an odd issue that I can't figure out.

On the home page of the site, www.domain.com, if I search the page reloads (Not returning to search/index) and the page is blank and there is no search query in the URL, just plain old domain.com.

This only effects the home page. I have a search in the header and If I move to another page, all works OK. It seems to be that I need segment_1 for the search to work.

If I search from www.domain.com/# the form searches and redirects to the correct search results page.

Have you come across this before?

{exp:low_search:form collection="product_filters|tub_products|pump_products|gen_products|guides|news|blog" query="{segment_2}" search_mode="any" form_autocomplete="off" form_id="18" loose_ends="right" form_class="form-search" result_page="search/index"}

Go

{/exp:low_search:form}

This is in a snippet that is then added to a Stash layout file that is embeded by site/index.

EE 2.6.1
LS 2.3.1

Replies

  1. Low 25 Sep 2013 10:48

    Might be a .htaccess thing. Take a look at this answer and see if that applies to your site.

  2. aurorameida 25 Sep 2013 10:58

    Wow, speedy - Awesome.

    Sadly that didn't fix it. This is my htaccess:

    RewriteEngine On

    # Removes index.php
    RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
    RewriteRule \.git - [F,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    #Redirect Non www to www.
    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

    DirectoryIndex index.php index.html

    Thanks for the support

  3. Low 25 Sep 2013 11:02

    What happens if you set the "Name of your site's index page" under CP > Admin > General Configuration back to "index.php"... Does that result in correct behaviour?

  4. aurorameida 25 Sep 2013 11:08

    Bingo, that worked. But I do have the dreaded index.php in the URL.

    Its odd. I have been using this .htaccess on this site for ages and it has always been OK. Made some tweaks to the home page and it stops.

    Do you have any suggestions to remedy this?

    Cheers

  5. Low 25 Sep 2013 11:15

    What files are in the root of your site?

  6. aurorameida 25 Sep 2013 11:17

    .gitignore
    .htaccess
    admin.php
    BingSiteAuth.xml
    favicon.ico
    index.php

  7. Low 25 Sep 2013 11:50

    What happens if you replace the .htaccess code with the code EllisLab officially recommends? http://ellislab.com/expressionengine/...

  8. aurorameida 25 Sep 2013 11:53

    Sadly I have tried that when you mentioned an htaccess issue. It hasn't had the desired effect.

    I really appreciate your help. Thanks.

  9. Low 25 Sep 2013 11:54

    Hmm. What's the HTML output of the search form on the home page?

  10. aurorameida 25 Sep 2013 11:59


    <form action="http://www.hottubdiy.dev/" method="post" class="form-search" id="18" autocomplete="off">
    <div class="hiddenFields">
    <input type="hidden" value="d05a0b746d5fb13350082298ea76f36d407e730e" name="XID">
    <input type="hidden" value="99" name="ACT">
    <input type="hidden" value="eyJjb2xsZWN0aW9uIjoicHJvZHVjdF9maWx0ZXJzfHR1Yl9wcm9kdWN0c3xwdW1wX3Byb2R1Y3RzfGdlbl9wcm9kdWN0c3xndWlkZXN8bmV3c3xibG9nIiwibG9vc2VfZW5kcyI6InJpZ2h0IiwicmVzdWx0X3BhZ2UiOiJzZWFyY2hcL2luZGV4Iiwic2VhcmNoX21vZGUiOiJhbnkifQ" name="params">
    <input type="hidden" value="1" name="site_id">
    </div>

    <div class="input-append">
    <input type="text" placeholder="Enter a keyword or an item SKU" id="keywords" name="keywords" class="search-query input-block-level">
    <button class="btn" name="submit" type="submit">Go</button>
    </div>
    </form>

  11. Low 25 Sep 2013 12:07

    Looks right. Well, that's tricky to debug, then. Would need to take a look myself. Any chance you could put the site online somewhere?

  12. aurorameida 25 Sep 2013 12:14

    No probs, thank you. I'll set it up. Whats your email?

    Cheers

  13. Low 25 Sep 2013 12:15

    You can send superadmin login creds to hi at gotolow dot com.

  14. Low 25 Sep 2013 12:51

    Turned out this was caused by an iffy browser issue.