Category and Tag that have the same slug

Is it expected that I can create a tag and a category whose slugs are exactly equal?

Of the issues, it leads the category being shown in the Tags page (where all tags are listed).

Is it intentional?

1 Like

I just did a test and don’t see any problem with this, unless there is something to it that I am missing. You can have tags that are categories and vice versa, no problem. It’s not the category that is shown in the tags page, but the tag. :slight_smile: And otherwise there is no conflict at all, with URL paths or anything else.

1 Like

image

@tobiaseigen Actually, both category and tag are shown.

1 Like

Hmm… is that a topic in a category that has the same slug as a tag? Or can you explain some more about how you got that screenshot?

Here is my tags page. ‘activities’ is a slug for a category and a tag. I only see the tag on the tag page.

1 Like

I’m using the latest Discourse, so should be a reproduction issue.

Try

  • restricting the tag to that particular category
  • making the category visible by admins only
  • viewing the Tags page on desktop screen
1 Like

Oh ok I am able to replicate now. I am not very familiar with the feature to limit tags to categories as I have no use for it so far myself. I guess you could do that with any tag and any category?

1 Like

I haven’t tried with any, but I thought this behaviour is weird and is worth reporting. Not sure if it can be considered a ux bug.

2 Likes

I have not seen this before but I can see how it might be useful to have a list of tags for each category directly on the tags page under a link to the category itself. The fact that they can be the same is not a bug, no.

Thanks for looking into it!

2 Likes

Ah! So it shows the category just to indicate the tag is restricted to that category!

1 Like