The duplicate topic title check doesn’t take into account whether the original title is that of a topic in a private category and it probably should.
AI-generated summary
The discussion addresses a limitation in Discourse’s duplicate topic title check, which currently prevents creating topics with existing titles regardless of whether the original topic is in a private or secure category. HAWK argues that this rule is illogical for users who cannot see the hidden duplicates, forcing them to invent unique titles unnecessarily. codinghorror counters that title uniqueness is essential for maintaining distinct slugs and avoiding URL confusion, citing the design since 2013. He notes that action is unlikely without multiple customer reports, though HAWK suggests logging the issue for future reference.
Stephen raises SEO concerns, while JWagstaff highlights practical workarounds for organizations using multiple private categories with identical topics. codinghorror points out that duplicate title support can be enabled via site settings if needed.
The conversation shifts to technical improvements when AndrewPA requests that error messages include the conflicting topic ID. This would significantly aid staff and admins in identifying unlisted or private topics causing conflicts, rather than requiring manual searches. zogstrip responds with a pull request (#41871) that aims to resolve this by only blocking duplicates if the user can see the other topic, and providing a direct link to it. AndrewPA welcomes this change as a significant usability improvement.
Whether a topic has permissions (through the category) or not doesn’t make it eligible to not be a duplicate topic title.
If it is a PM, that’s a different matter.
I’d argue that it should. What is the rationale behind the rule?
Slug / title duplication, essentially. It’s been this way by design since inception in 2013.
That’s the logic but it’s not really solid a rationale IMO… what are we trying to fix or avoid with the rule?
Why is it suddenly a problem if it’s been this way since 2013 ![]()
I’d like to see 3-4 reports of problems from customers before proceeding. I don’t take action on a sample size of one.
Because it makes no sense for a user that can’t see the other duplicates. They are forced to make up a title just to avoid a rule.
Fair enough that we don’t take action at this point but it still needs to be logged (in case 2 more come in).
Well, I’d argue this is kinda correct, in the same way that if your password is a duplicate then you shouldn’t really be allowed to use it, even if other people have that password as well.
The potential confusion between
http://discourse.example.com/t/upgrading-discourse/8922
http://discourse.example.com/t/upgrading-discourse/7451
.. is substantial.
One has security implications and the other is just plain confusing…
But all good. Let’s leave this here for posterity with no action required right now.
The only place where slug duplication is really material is for SEO. If one resides in a secure category and we’re always talking about the less secured topic being created second, then surely this isn’t going to be a factor?
Hello, this is posterity. We’re creating a number of private categories, each with the same topics in them - but we’ve run up against this issue. Is there any way we can work around it?
Enable duplicate title support in site settings if you need that.
Please consider surfacing the conflicting topic ID in the error.
When a topic update fails the title-uniqueness check (has_already_been_used), the error gives no indication of which topic is causing the conflict. This is especially painful because the check runs against Topic.listable_topics, so the conflicting topic can be unlisted. There’s no direct path from the error to the cause; staff have to know to search with status:unlisted and guess at category/wording variations.
For staff/admin users, including that topic’s ID (or admin URL) in the error response would turn a multi-step investigation into a one-click fix, e.g.:
{“errors”: [“Title has already been used”], “conflicting_topic_id”: 12345}
It’s quite a delicate balance, so I’m not even sure this change is “correct”
The idea is that we’ll only ever block if you can see the other topic. If you can, we’ll even provide a link to the topic so it’s a one-click to view it.
The link is the primary thing that is really needed on the user side, so this seems like an absolute win to me! Not to mention, using a single enum seems like a better choice than two booleans for such closely-linked logic. Thanks for sharing this.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.