# Search Parameters Removed On Search

**URL:** https://meta.discourse.org/t/search-parameters-removed-on-search/64802
**Category:** Bug
**Created:** [June 20, 2017, 10:58am UTC](https://meta.discourse.org/t/search-parameters-removed-on-search/64802 "2017-06-20T10:58:34Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![alexs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexs/32/139956_2.png) [@alexs](https://meta.discourse.org/u/alexs)
#### Post date: [June 20, 2017, 10:58am UTC](https://meta.discourse.org/t/search-parameters-removed-on-search/64802/1 "2017-06-20T10:58:34Z")

</div>

Since the release of version 1.8 I’ve noticed that the search parameters `group:[group name]` & `@username` (I haven’t checked others) that have been typed into the search bar, are removed from the search box itself & the query summary, when I execute a search -

 ![](https://global.discourse-cdn.com/meta/original/3X/4/9/494e6577f68cf62513c64158b3da56f11cfbf73f.png)

becomes

 ![](https://global.discourse-cdn.com/meta/original/3X/4/9/493a574ac2afe9063351de0d9a49fe0d384b57ad.png)

though the parameter is still applied to the search.

But if I then change the result’s Sort By (blue box above), the parameter is not applied to the search so I have to keep adding it back into the query if I do this or want to try a different search term.

Presumably this is a bug? (Apologies if this has been posted already, I did look).

---

<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: [June 20, 2017, 11:31pm UTC](https://meta.discourse.org/t/search-parameters-removed-on-search/64802/2 "2017-06-20T23:31:11Z")

</div>

Any thoughts here @cpradio?

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [June 21, 2017, 12:06am UTC](https://meta.discourse.org/t/search-parameters-removed-on-search/64802/3 "2017-06-21T00:06:05Z")

</div>

Possibly the Ember upgrade?

It seems I have fixed this once before, not sure why it no longer works though  
[https://github.com/discourse/discourse/commit/70cf36700be50e8a5512fe3042b8c0febc5cb1b0#diff-d8f8a0225b6661e2dd68852bdeb0b9e5](https://github.com/discourse/discourse/commit/70cf36700be50e8a5512fe3042b8c0febc5cb1b0#diff-d8f8a0225b6661e2dd68852bdeb0b9e5)

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [June 21, 2017, 12:25am UTC](https://meta.discourse.org/t/search-parameters-removed-on-search/64802/4 "2017-06-21T00:25:38Z")

</div>

I think I’ve proven it now. I just loaded the following commit:  
[SECURITY: theme key should be an anon cache breaker · discourse/discourse@ac1f84d · GitHub](https://github.com/discourse/discourse/commit/ac1f84d3e1529bd29388378d8d1b2dc2a26e4314)

Which is immediately before the Ember 2.13 upgrade and the search operators are maintained. I’m about to upgrade to [Upgrade Ember to 2.13 · discourse/discourse@8ae4457 · GitHub](https://github.com/discourse/discourse/commit/8ae445766fbda2438b597d4d4827efddef68db9d) to verify they disappear, but at the very least, I know for a fact, it just broke recently.

**Edited:**  
Welp, that sounded good in theory, but it seems to not be entirely true, I’m not 100% sure when this broke now. I discovered if you do a hard refresh, and then use the search icon, and click Show More, the parameters transfer fine. Once you click the search button on the full page search… they disappear, and they continue to disappear on all future searches too. This is very bizarre.

---

<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: [June 21, 2017, 1:29am UTC](https://meta.discourse.org/t/search-parameters-removed-on-search/64802/5 "2017-06-21T01:29:01Z")

</div>

Probably good for @eviltrout to have a look

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [June 21, 2017, 7:52pm UTC](https://meta.discourse.org/t/search-parameters-removed-on-search/64802/6 "2017-06-21T19:52:25Z")

</div>

This is result of the patch that removed hidden whitespace from search terms. Here’s a fix:

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

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [June 21, 2017, 7:52pm UTC](https://meta.discourse.org/t/search-parameters-removed-on-search/64802/7 "2017-06-21T19:52:28Z")

</div>


