Search error / empty page

Hi there!

Client of mine is having an issue with site search, it works most of the time however an error occurs on some computers/browsers. Basically, sometimes search will display empty results page and by opening devtools console I can see it has some errors in Site_Search_Results.min.js. But sometimes it works great. Please see attached screenshots.

Error is

{"status":"error","message":"Invalid input JSON on line -1, column -1: Cannot build ContentSearchRequest, some of required attributes are not set [term]","correlationId":"6d91bc6f-126a-4f4a-bd91-669d2d922165"}

For example, search works on Safari on iMac with OS Catalina. But it doesn’t work on Safari on MacBook with OS Catalina. It works on Chrome on all computers my side, but on clients side it doesn’t work on Chrome with OS Catalina.

Example:

https://www.epiuselabs.com/hs-search-results?term=page&language=en&type=LANDING_PAGE&type=SITE_PAGE&type=BLOG_POST

Can someone please assist?

Thanks a mil!

@piersg , @Anton seeing anything here that is suspicious?

@markodotwork, you might need to provide the code running the search

Thanks so much @dennisedson! I can provide you with code for the whole template but let me know. It’s just a search input field and Search Results module.

It just started working on Safari on MacBook where it didn’t work before, this is so weird…

Strange… @Anton , what do you think?

Hi @markodotwork,

as @dennisedson mentioned - we’ll need the code to provide best possible help.

I’ve tested the page on in Chrome on my win10 pc. No problems.

Will check it on my macbook pro after work.

best,

Anton

Thanks for all your help guys, I have found out that this bug appears only if you try searching on website w/o www in URL.

For example, www and root domain will return different data:

Posting this if anyone else is looking for a solution to this, you just need to create a redirection from root domain to www.

Cheers