# Adding tag to two or more groups breaks the tag

**URL:** <https://meta.discourse.org/t/adding-tag-to-two-or-more-groups-breaks-the-tag/95807>\
**Category:** Bug\
**Created:** [August 28, 2018, 5:35am UTC](https://meta.discourse.org/t/adding-tag-to-two-or-more-groups-breaks-the-tag/95807 "2018-08-28T05:35:52Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![LeoDavidson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leodavidson/32/119574_2.png) [@LeoDavidson](https://meta.discourse.org/u/LeoDavidson)\
**Post date:** [August 28, 2018, 5:35am UTC](https://meta.discourse.org/t/adding-tag-to-two-or-more-groups-breaks-the-tag/95807/1 "2018-08-28T05:35:52Z")

</div>

Discourse version: v2.1.0.beta5 +66  
Self hosted.

* * *

This was touched on in an earlier (closed) thread, but maybe the issue wasn’t described fully (it’s definitely a bug, not a configuration error), or the bug has come back:

> [@Can't use certain tags to tag topics anymore](https://meta.discourse.org/t/cant-use-certain-tags-to-tag-topics-anymore/47400/18):
>
> [I fixed something](https://github.com/discourse/discourse/commit/5f67cd7b45807ab0640869f35d0ed58aacce91ed) confusing about the UI that might be what you’re describing. A tag “ford” is restricted to be used in a category. In a different category, try to add the “ford” tag. Someone who is allowed to create new tags sees this, and you can add “ford” to the tags input: [image] Someone who is not allowed to create new tags sees this, and can’t add “ford”: [image] The second case is correct since no one should be able to add that tag in the wrong category.

* * *

### Problem summary:

If you add the same tag to two or more tag groups, everything looks fine, but any attempt to actually apply the tag to a topic will fail. (At least using the edit-subject-and-tags option at the top of a topic.)

It will _look_ like the tag has been applied to the topic, with it appearing under the title on the page you made the edit on _until you refresh the page_. Then that tag vanishes. The never appears for the topic on the main topic list, and the topic never appears on the page for the tag. Auto-completion of the tag is also broken.

### Workaround:

Remove the tag from _all but one_ tag groups and it will work again.

However, if you do not know this is the cause of the problem or do not notice you added the same thing to two groups, you’ll have a bad time. 🙂 (Even more confusing if, like me, you had the tag in _three_ groups and didn’t notice. I found the above thread, tried removing the tag from the new group, but it still didn’t work as it was already broken from being in two others. It was only looking through the database that I realised.)

* * *

I figure this must be a bug as it’s not useful or intuitive, and the admin UI does not prevent you from creating the tag-groups situation, while the post-editor lets you use the tag and indicates it thinks it was applied, only to lose it on refresh.

* * *

Edit: I just noticed I have another tag which is in two groups and is working, so there may be some extra thing needed to get into this state. I can’t think what, but I’m happy to try anything you can suggest, or dig up info from the database if it’s needed.

---

_[View the full topic](https://meta.discourse.org/t/adding-tag-to-two-or-more-groups-breaks-the-tag/95807)._
