Using literal ampersands in Low Search
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
Low 7 Sep 2015 13:53
What version of EE and LS are you on?
Neil Anderson 7 Sep 2015 14:06
ee: 2.7.3 and ls: 3.1.5.
Low 7 Sep 2015 14:07
Try upgrading LS to the latest version.
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.
Low 7 Sep 2015 14:08
Yes.
Neil Anderson 7 Sep 2015 14:09
Thanks for your help - will give that a go then and get back to you!
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?
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.
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?
Low 7 Sep 2015 14:24
It was part of the refactoring I did for v4.