# Search error / empty page

**URL:** <https://community.hubspot.com/t/search-error-empty-page/37288>\
**Category:** CMS Development\
**Tags:** javascript, forms, professional\
**Created:** [May 13, 2021, 6:42pm UTC](https://community.hubspot.com/t/search-error-empty-page/37288 "2021-05-13T18:42:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![markodotwork](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/markodotwork/32/9373_2.png) [@markodotwork](https://community.hubspot.com/u/markodotwork)\
**Post date:** [May 13, 2021, 6:42pm UTC](https://community.hubspot.com/t/search-error-empty-page/37288/1 "2021-05-13T18:42:39Z")

</div>

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"}`

 ![Screenshot 2021-05-12 at 2.44.39 PM.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/a/9ab0cbb2145a2e495e1869d8028f45dfd1067bb9.jpeg)

 ![Screenshot 2021-05-12 at 2.42.49 PM.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/5/a/5ac110f3e39a3decf80bb3e04022da35f7cedca6.jpeg)

 ![Screenshot 2021-05-12 at 2.42.02 PM.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/b/8/b83c53fb0102f9b48e99c7fedc99280373e3aac4.jpeg)

 ![search-hubspot-error.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/c/f/cf421c65e4a8c66262c0606c97e9cc8c014f3591.jpeg)

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](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!

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [May 14, 2021, 3:34pm UTC](https://community.hubspot.com/t/search-error-empty-page/37288/2 "2021-05-14T15:34:56Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![markodotwork](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/markodotwork/32/9373_2.png) [@markodotwork](https://community.hubspot.com/u/markodotwork)\
**Post date:** [May 14, 2021, 3:53pm UTC](https://community.hubspot.com/t/search-error-empty-page/37288/3 "2021-05-14T15:53:42Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [May 17, 2021, 1:38pm UTC](https://community.hubspot.com/t/search-error-empty-page/37288/4 "2021-05-17T13:38:46Z")

</div>

Strange… @Anton , what do you think?

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [May 17, 2021, 2:00pm UTC](https://community.hubspot.com/t/search-error-empty-page/37288/5 "2021-05-17T14:00:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![markodotwork](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/markodotwork/32/9373_2.png) [@markodotwork](https://community.hubspot.com/u/markodotwork)\
**Post date:** [June 15, 2021, 5:30pm UTC](https://community.hubspot.com/t/search-error-empty-page/37288/6 "2021-06-15T17:30:24Z")

</div>

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:

- [https://yourdomain.com/\_hcms/search?term=lrvgtldfdf](https://yourdomain.com/%5C_hcms/search?term=lrvgtldfdf)
- and
- [https://www.yourdomain.com/\_hcms/search?term=lrvgtldfdf](https://www.yourdomain.com/%5C_hcms/search?term=lrvgtldfdf)

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
