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

Support archive

Using literal ampersands in Low Search

Neil Anderson 7 Sep 2015 11:37 question, complete

Any idea how I can use a literal ampersand as part of a search parameter? For instance: search:product_name="Bang & Olufsen". At the moment, the DB query produced by this is something like: "WHERE ((field_id_82 = 'Bang') AND (field_id_82 = 'Olufsen'))"

Replies

  1. Low 7 Sep 2015 13:53

    What version of EE and LS are you on?

  2. Neil Anderson 7 Sep 2015 14:06

    ee: 2.7.3 and ls: 3.1.5.

  3. Low 7 Sep 2015 14:07

    Try upgrading LS to the latest version.

  4. Neil Anderson 7 Sep 2015 14:08

    Will it support that version of EE? I realise it's quite old but unfortunately our environment won't support anything newer.

  5. Low 7 Sep 2015 14:08

    Yes.

  6. Neil Anderson 7 Sep 2015 14:09

    Thanks for your help - will give that a go then and get back to you!

  7. Neil Anderson 7 Sep 2015 14:16

    Unfortunately, after upgrading to 4.3.1 it doesn't seem to have resolved it. Is there anything I'm required to do in order to make this work?

  8. Low 7 Sep 2015 14:17

    What's the template code you're using? You can use http://pastie.org/ or http://pastebin.com/ for large chunks of code.

  9. Neil Anderson 7 Sep 2015 14:17

    Ah - never mind! I'd still had the old double ampersands in from earlier. Switching to a single again has fixed the issue. Thank you very much!

    Out of interest, what was the actual improvement you'd made to the module for this to work?

  10. Low 7 Sep 2015 14:24

    It was part of the refactoring I did for v4.