# \`undefined\` as a search term is getting lost and not highlighted in the search results

**URL:** https://meta.discourse.org/t/undefined-as-a-search-term-is-getting-lost-and-not-highlighted-in-the-search-results/65559
**Category:** Bug
**Created:** [4 juli 2017 om 07:54 UTC](https://meta.discourse.org/t/undefined-as-a-search-term-is-getting-lost-and-not-highlighted-in-the-search-results/65559 "2017-07-04T07:54:46Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Sujan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sujan/32/70979_2.png) [@Sujan](https://meta.discourse.org/u/Sujan)
#### Post date: [4 juli 2017 om 07:54 UTC](https://meta.discourse.org/t/undefined-as-a-search-term-is-getting-lost-and-not-highlighted-in-the-search-results/65559/1 "2017-07-04T07:54:46Z")

</div>

1. Getting lost:  
If you search for `'console' is undefined` here in the forum you will be directed to a search result page of `'console' is`: [Search results for '"'console' is undefined"' - Discourse Meta](https://meta.discourse.org/search?q=%22%27console%27%20is%20undefined%22)

2. Not getting highlighted:  
Even if the search term does appear correctly in the search field (I don’t understand when it gets lost and when it works) the “undefined” string will not be highlighted in the search results: [Search results for '"Error: Cannot read property 'name' of undefined"' - Ionic Forum](https://forum.ionicframework.com/search?q=%22Error%3A%20Cannot%20read%20property%20%27name%27%20of%20%20undefined%22)

Edit: The “not getting highlighted” thing appears to be a bug when you manually search for it again after opening the URL, then the search term appears correctly in the search box, but really is still broken. 2) might be solved when 1) is solved then.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [4 juli 2017 om 20:52 UTC](https://meta.discourse.org/t/undefined-as-a-search-term-is-getting-lost-and-not-highlighted-in-the-search-results/65559/2 "2017-07-04T20:52:46Z")

</div>

What do you think @sam?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [25 juli 2017 om 19:31 UTC](https://meta.discourse.org/t/undefined-as-a-search-term-is-getting-lost-and-not-highlighted-in-the-search-results/65559/3 "2017-07-25T19:31:29Z")

</div>

Yeah there is a bug here, added to my list

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [13 november 2017 om 06:29 UTC](https://meta.discourse.org/t/undefined-as-a-search-term-is-getting-lost-and-not-highlighted-in-the-search-results/65559/4 "2017-11-13T06:29:08Z")

</div>

Fixed per:

[https://github.com/discourse/discourse/commit/cb14da4d90af2a397e0eca9393cfe1c24f43cd61](https://github.com/discourse/discourse/commit/cb14da4d90af2a397e0eca9393cfe1c24f43cd61)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [13 november 2017 om 06:29 UTC](https://meta.discourse.org/t/undefined-as-a-search-term-is-getting-lost-and-not-highlighted-in-the-search-results/65559/5 "2017-11-13T06:29:11Z")

</div>


