# Can't create new tag and change category at the same time

**URL:** https://meta.discourse.org/t/cant-create-new-tag-and-change-category-at-the-same-time/145728
**Category:** Bug
**Created:** [26 maart 2020 om 19:37 UTC](https://meta.discourse.org/t/cant-create-new-tag-and-change-category-at-the-same-time/145728 "2020-03-26T19:37:06Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [26 maart 2020 om 19:37 UTC](https://meta.discourse.org/t/cant-create-new-tag-and-change-category-at-the-same-time/145728/1 "2020-03-26T19:37:06Z")

</div>

When I change the category a topic is in (via the edit topic title thingo) I am finding that I cannot also tag. If I try, I get the message “this topic has tags that aren’t allowed” - when this is not the case.

My workaround is to save the category change, and then re-open the edit topic title thingo, and then add the tags. It works just fine then. Neither category limit tags in any way.

This is very similar (or even the same) as:

> [@Changing category - "this topic has tags that aren't allowed"](https://meta.discourse.org/t/changing-category-this-topic-has-tags-that-arent-allowed/122769):
>
> When changing the category of a topic, if the topic has tags that aren’t allowed the new category, it doesn’t let me update the category. This is fine – however if I then try to delete those tags and update the category and tags again at the same time, it says that those tags are still there and doesn’t let me upload. To get around this, I have to delete the tags, refresh the page, and then change the topic. I have a screen recording of the issue if you allow me to upload a .mov file. …

Can you reproduce it? Happy to do a video if you like.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [26 maart 2020 om 19:40 UTC](https://meta.discourse.org/t/cant-create-new-tag-and-change-category-at-the-same-time/145728/3 "2020-03-26T19:40:02Z")

</div>

Hi, yes I can imagine how it happens, will have a look at this by end of next week.

---

<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: [26 maart 2020 om 23:09 UTC](https://meta.discourse.org/t/cant-create-new-tag-and-change-category-at-the-same-time/145728/4 "2020-03-26T23:09:54Z")

</div>

Hmm, I just changed this from #Contribute > Bug to #Support and added the “feedback” tag at the same time, in the same edit. No repro. Can you give me more specifics please?

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [27 maart 2020 om 03:54 UTC](https://meta.discourse.org/t/cant-create-new-tag-and-change-category-at-the-same-time/145728/5 "2020-03-27T03:54:07Z")

</div>

Worked it out:

It only happens when the tag doesn’t yet exist. I can change categories and tag with an existing tag, but not with a new tag.

A bit similar to this, eh?

> [@Adding a new tag in the default tags fields](https://meta.discourse.org/t/adding-a-new-tag-in-the-default-tags-fields/145126/6):
>
> Yes we should certainly fix this. @vinothkannans can you add a validation on those tag settings?

---

<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: [27 maart 2020 om 04:57 UTC](https://meta.discourse.org/t/cant-create-new-tag-and-change-category-at-the-same-time/145728/6 "2020-03-27T04:57:44Z")

</div>

Thanks, I have edited the title to be more specific! 🤝

---

<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: [30 maart 2020 om 19:48 UTC](https://meta.discourse.org/t/cant-create-new-tag-and-change-category-at-the-same-time/145728/10 "2020-03-30T19:48:05Z")

</div>

I’ll be looking at this @nathank. It’s a tricky one.

Actually, not so tricky. I made a fix just now.

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

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [31 maart 2020 om 07:15 UTC](https://meta.discourse.org/t/cant-create-new-tag-and-change-category-at-the-same-time/145728/14 "2020-03-31T07:15:56Z")

</div>

This should be fixed @nathank, thanks to @neil

Let us know if it doesnt fix the issue.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [31 maart 2020 om 07:16 UTC](https://meta.discourse.org/t/cant-create-new-tag-and-change-category-at-the-same-time/145728/15 "2020-03-31T07:16:03Z")

</div>


