Unable to create tag when name is in existing tag with underscore

Summary: Over at Stonehearth we previously created tags like crafting and crafting_suggestion. Doing some cleanup, crafting was removed from all topics. Now we cannot recreate the tag.

Steps to reproduce:

  1. Add a tag to a topic
  2. Add a different tag to a topic that has two words separated by an underscore and one word being the above created tag.
  3. Remove the tag from #1 from all topics “deleting” the tag.
  4. Attempt to add the tag back to a topic.

Expected Results:

Tag is added to topic.

Actual Results:

Tag does not appear as an option


This is likely an issue even if step 1 is skipped, but I haven’t tested it.


Version Number:

Discourse 1.7.0.beta5 (discourse.stonehearth.net)

System Information:

Windows 10 Education, Chrome Stable 54


Sure @neil can have a look.

1 Like

I can’t repro.

Both tags appear, even though one has 0 topics.

1 Like

I can reproduce it Neil.
The key, which isn’t clear, is to press Rename Tag.

Remove the first tag from a topic. (crafting)
Click the second tag, (crafting_stuff) - and Rename Tag to ‘crafting’.(.com/tags/crafting_stuff)
Name has already been taken. Tag page shows no ‘crafting’ tag

I think the mistake is the assumption that removing “crafting” has deleted it. The error “name has already been taken” is telling the truth. There was a problem where unused tags were not being shown anywhere, which is probably why you thought they were deleted. I fixed that today. So you can find it on your /tags page or navigate to /tags/crafting and delete it.

We don’t automatically delete tags because we allow you to pre-define them. For example you can setup your tag groups like so:


gotcha, that makes sense, so even though on the tags page an unused but created tag doesn’t show, it’s still in the system and will show on the tags page once it is added to a post.


So i guess the OP should edit each post and add the ‘crafting’ tag, rather than renaming the exisiting ‘crafting_suggestion’ tag.

Or go to /tags/crafting, delete it, and then rename crafting_suggestion to crafting.


yep works like a charm.

@neil, @GSeven thanks for the great discussion, however, I don’t think this actually addressed the issue I was seeing.

@neil, I think I understand the (now fixed) issue with tags not fully being removed. Assuming that was what was happening, then I shouldn’t have had an issue here. I resolved the issue with crafting by deleting the crafting tag from /tags/crafting and then was able to use it again. I was not trying to rename crafting_suggestions to crafting, I was trying to rename craftin (a temporary tag I created) to crafting.

The issue is still occurring at Stonehearth right now, try to create a topic with the performance tag. It is not being allowed:

Once we get an update deployed I can go through /tags and delete all tags with no topics to solve this, but I don’t feel I should have to.