# 标题已使用（在安全类别中）

**URL:** https://meta.discourse.org/t/title-has-already-been-used-in-a-secure-category/123047
**Category:** Feature
**Created:** [2019年七月16日 07:51 UTC](https://meta.discourse.org/t/title-has-already-been-used-in-a-secure-category/123047 "2019-07-16T07:51:14Z")
**Posts on this page:** 1
**Showing post:** 16

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2026年七月21日 13:38 UTC](https://meta.discourse.org/t/title-has-already-been-used-in-a-secure-category/123047/16 "2026-07-21T13:38:12Z")

</div>

这是一个相当微妙的平衡，所以我甚至不确定这个更改是否“正确”

> <https://github.com/discourse/discourse/pull/41871>
>
> Previously, the duplicate topic title check compared new titles against every to…pic on the site regardless of visibility: users were blocked by titles in categories they couldn't see or unlisted topics they couldn't find, the bare "Title has already been used" error gave no way to locate the conflict (and doubled as an existence oracle for hidden titles), and the behavior was controlled by two entangled boolean settings.
> 
> This change scopes the check to the destination category plus whatever the acting user can actually see, links the conflicting topic in the error — safe by construction, since being blocked now implies being able to see it:
> 
> \> This title has already been used by \[another topic\]().
> 
> It also consolidates the two booleans into a single \`duplicate\_topic\_titles\` enum (\`disallowed\` / \`allowed\_across\_categories\` / \`allowed\`), with existing values migrated and the old names kept as hidden deprecated aliases that admin search still resolves.
> 
> Reported in https://meta.discourse.org/t/title-has-already-been-used-in-a-secure-category/123047
> 
> Note for self-hosters: env-provided settings can't be migrated — \`DISCOURSE\_ALLOW\_DUPLICATE\_TOPIC\_TITLES=true\` configs need to switch to \`DISCOURSE\_DUPLICATE\_TOPIC\_TITLES=allowed\`.

我们的想法是，只有在你能够看到另一个主题时，我们才会进行屏蔽。如果你能看到，我们甚至会提供该主题的链接，以便一键查看。

---

_[View the full topic](https://meta.discourse.org/t/title-has-already-been-used-in-a-secure-category/123047)._
