# Select tag, change category, tag still selected

**URL:** https://meta.discourse.org/t/select-tag-change-category-tag-still-selected/51741
**Category:** Bug
**Created:** [10월 19, 2016, 3:42오후 UTC](https://meta.discourse.org/t/select-tag-change-category-tag-still-selected/51741 "2016-10-19T15:42:39Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![GSeven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gseven/32/61731_2.png) [@GSeven](https://meta.discourse.org/u/GSeven)
#### Post date: [10월 19, 2016, 3:42오후 UTC](https://meta.discourse.org/t/select-tag-change-category-tag-still-selected/51741/1 "2016-10-19T15:42:39Z")

</div>

I’ve been getting lots of amazing help from @cpradio today, and i came across an issue with tags.

I’m unsure if it is a bug or working as intended, so i’m going to post this here to get a bit of discourse team feedback on it.

When i select a category, then a subcategory, then a tag, everything filters properly. However, if i change category from the category selector, the tag is still present in the new category results.

the url changes like this:

select category: .com/c/soccer  
select subcategory: .com/c/soccer/mancity  
select tag: .com/tags/c/soccer/mancity/sergioaguero  
select a different category: .com/tags/c/swimming/sergioaguero

i was wondering if the tag selection should reset on entering a new category?, like it does if you go ‘home’ and select a new category.

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [10월 19, 2016, 9:12오후 UTC](https://meta.discourse.org/t/select-tag-change-category-tag-still-selected/51741/2 "2016-10-19T21:12:42Z")

</div>

Not sure what people want to happen when they change the category filter while the tag filter is set. I tend to agree with you that the tag filter should reset.

There are other issues, [like this one](https://meta.discourse.org/t/discourse-1-6-tagging-issues/51072/6), that may be related to this bug.

---

<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: [10월 19, 2016, 9:34오후 UTC](https://meta.discourse.org/t/select-tag-change-category-tag-still-selected/51741/3 "2016-10-19T21:34:55Z")

</div>

> [@neil](#):
>
> I tend to agree with you that the tag filter should reset.

I think the nail in the coffin to support that is the fact that you can have category specific tags, so when changing to another category, the prior selected tag might not be valid anymore. Which brings up a really good reason to reset it on that condition.

---

<div class="post-metadata">

### Author: ![GSeven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gseven/32/61731_2.png) [@GSeven](https://meta.discourse.org/u/GSeven)
#### Post date: [10월 19, 2016, 9:55오후 UTC](https://meta.discourse.org/t/select-tag-change-category-tag-still-selected/51741/4 "2016-10-19T21:55:36Z")

</div>

Yes Neil, changing categories with a tag set, means you are stuck in .com/tags/c/ mode, no matter how many times you change category or change tags or even with tags: none, until you go home and begin again.

Changing category should, i think, reset the url to .com/c/

---

<div class="post-metadata">

### Author: ![GSeven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gseven/32/61731_2.png) [@GSeven](https://meta.discourse.org/u/GSeven)
#### Post date: [10월 28, 2016, 8:32오후 UTC](https://meta.discourse.org/t/select-tag-change-category-tag-still-selected/51741/5 "2016-10-28T20:32:52Z")

</div>

Does the Discourse team this will get changed in the future?

I would go as far to say that even if you change sub-category,  
the tag filter should reset.

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [10월 28, 2016, 8:44오후 UTC](https://meta.discourse.org/t/select-tag-change-category-tag-still-selected/51741/6 "2016-10-28T20:44:33Z")

</div>

Yes, sorry that I keep dropping this one down my todo list. The ugly ember.js router code I wrote scares me every time I look at it. Will try to get this one done.

---

<div class="post-metadata">

### Author: ![GSeven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gseven/32/61731_2.png) [@GSeven](https://meta.discourse.org/u/GSeven)
#### Post date: [10월 28, 2016, 8:47오후 UTC](https://meta.discourse.org/t/select-tag-change-category-tag-still-selected/51741/7 "2016-10-28T20:47:19Z")

</div>

absolutely no problem at all, just making sure i can plan ahead knowing something will happen eventually.

good luck mate

:fonzie:

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [10월 28, 2016, 9:30오후 UTC](https://meta.discourse.org/t/select-tag-change-category-tag-still-selected/51741/8 "2016-10-28T21:30:25Z")

</div>

jk, easiest bug fix ever! Removing the ugly router code that implements that behaviour was the solution.

---

<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: [10월 28, 2016, 10:43오후 UTC](https://meta.discourse.org/t/select-tag-change-category-tag-still-selected/51741/9 "2016-10-28T22:43:39Z")

</div>


