Search Parameters Removed On Search

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 -

becomes

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).

1 Like

Any thoughts here @cpradio?

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

2 Likes

I think I’ve proven it now. I just loaded the following commit:
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 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.

1 Like

Probably good for @eviltrout to have a look

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

https://github.com/discourse/discourse/commit/aaaa93c216f6a0d712514e80dc5f1dc30ed8ade6

5 Likes