SXA Search box Suggestion component, returns error in specific cases if the returned results contain chars like "." or "\" for example.

Any one faced this issue before? enter image description here

enter image description here

  • This actually looks like a bug. I will try to confirm this and register as an issue in our backlog. I'll keep you updated. Commented Apr 24, 2018 at 13:24
  • Thanks Dawid, Please let me know if there is a temp fix for this error
    – NAli
    Commented Apr 26, 2018 at 7:08

1 Answer 1


In order to use suggestions please remember that you need to have:

  • at least Sitecore 9.0
  • Solr

Before first usage you need to:

  1. In the solrconfig.xml for your index, you need to add suggest searchComponent and component need to be called sxaSuggester.
  2. Create /suggest requestHandler in the same file
  3. Build the suggester http://localhost:8983/solr/sitecore_sxa_master_index/suggest?suggest.build=true. This will also tell you if your component is working fine.
  4. And you can query for some suggestions: http://localhost:8983/solr/sitecore_sxa_master_index/suggest?suggest.q=test

Keep in mind that what you will see depends on Solr configuration. There are thousands of possible suggestion configurations on Solr!

Regarding your issue: I can confirm that it was a bug and will be fixed in SXA 1.7.1. The problem was in this line:

enter image description here

As a quick workaround while waiting for SXA 1.7.1 you can replace this line with: text = data.html.replace(/(<([^>]+)>)/ig, "").

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.