# Subcategories with same name and same tag group break

**URL:** <https://meta.discourse.org/t/subcategories-with-same-name-and-same-tag-group-break/52347>\
**Category:** Bug\
**Created:** [November 2, 2016, 1:52am UTC](https://meta.discourse.org/t/subcategories-with-same-name-and-same-tag-group-break/52347 "2016-11-02T01:52:00Z")\
**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:** [November 2, 2016, 1:52am UTC](https://meta.discourse.org/t/subcategories-with-same-name-and-same-tag-group-break/52347/1 "2016-11-02T01:52:00Z")

</div>

I’ve literally been on this for 3 days, and it’s been driving me crazy, but i _think_ i’ve nailed it down

Cat \> Sub Cat \> Tag Group  
Restaurants \> London \> Chelsea,Wembley,Wimbledon etc  
Cinemas \> London \> Chelsea,Wembley,Wimbledon etc

If a sub category has the same name and tag group as one from another category, topics don’t appear in one of the categories when you filter.

🙏

---

<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:** [November 2, 2016, 3:09am UTC](https://meta.discourse.org/t/subcategories-with-same-name-and-same-tag-group-break/52347/2 "2016-11-02T03:09:55Z")

</div>

@neil this one is for you 🙂

---

<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:** [November 2, 2016, 8:19am UTC](https://meta.discourse.org/t/subcategories-with-same-name-and-same-tag-group-break/52347/3 "2016-11-02T08:19:53Z")

</div>

Sorry about this, i appreciate tags must be a whole lot of fun for you guys.

❤

---

<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:** [November 2, 2016, 4:08pm UTC](https://meta.discourse.org/t/subcategories-with-same-name-and-same-tag-group-break/52347/4 "2016-11-02T16:08:44Z")

</div>

Yes tags add so much FUN to our queries… 😁

I think I reproduced the problem, or maybe a related problem. In my repro, the categories do not have any tag groups assigned to them, so tags can be used anywhere.

 ![](https://global.discourse-cdn.com/meta/original/3X/3/5/3548696076e00f201f30d4c457cddf90ed178c02.png)

 ![](https://global.discourse-cdn.com/meta/original/3X/b/b/bbe268dd17e058e1e3ce0224240d1da4c0e161dd.png)

A topic tagged with many tags belonging to a group doesn’t show up when filtered by category, subcategory, and one of its tags.

The subcategory name and tag group name are the same, but I doubt that’s a problem…

---

<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:** [November 2, 2016, 4:20pm UTC](https://meta.discourse.org/t/subcategories-with-same-name-and-same-tag-group-break/52347/5 "2016-11-02T16:20:50Z")

</div>

certainly seems similar, the reason i thought it was because they had the same name is because the posts showed when i changed the slug on one of them to ‘cambridgeshire1’

what do you get if you change the slug?

right now, changing the slug leads to 500 Internal Server Error, and it messes up even more 😕

---

<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:** [November 2, 2016, 4:47pm UTC](https://meta.discourse.org/t/subcategories-with-same-name-and-same-tag-group-break/52347/6 "2016-11-02T16:47:35Z")

</div>

> [@neil](#):
>
> The subcategory name and tag group name are the same, but I doubt that’s a problem…

FYI - If the subcat name and tag group used are the same as another 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:** [November 2, 2016, 8:02pm UTC](https://meta.discourse.org/t/subcategories-with-same-name-and-same-tag-group-break/52347/7 "2016-11-02T20:02:16Z")

</div>

> [@neil](#):
>
> The subcategory name and tag group name are the same, but I doubt that’s a problem…

It wasn’t the tag group name, it was the identical subcategory names. Subcategories with the same name can mess up the tag filtering. I committed a fix for it. @GSeven Pull the latest commits and see if that fixes the weird behaviours you’re seeing.

---

<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:** [November 2, 2016, 11:07pm UTC](https://meta.discourse.org/t/subcategories-with-same-name-and-same-tag-group-break/52347/8 "2016-11-02T23:07:36Z")

</div>

Sanity restored!

Well done mate, that fix works a treat, thanks for all your time and effort.

☮

---

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [November 2, 2016, 11:17pm UTC](https://meta.discourse.org/t/subcategories-with-same-name-and-same-tag-group-break/52347/9 "2016-11-02T23:17:49Z")

</div>


