# 为什么当ID存在时，Composer中的数字标签会失效

**URL:** https://meta.discourse.org/t/why-do-numerical-tags-fail-in-the-composer-when-id-exists/407955
**Category:** Bug
**Tags:** tags, fixed
**Created:** [2026年七月18日 17:47 UTC](https://meta.discourse.org/t/why-do-numerical-tags-fail-in-the-composer-when-id-exists/407955 "2026-07-18T17:47:46Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [2026年七月19日 18:09 UTC](https://meta.discourse.org/t/why-do-numerical-tags-fail-in-the-composer-when-id-exists/407955/3 "2026-07-19T18:09:13Z")

</div>

如果可能的话，我认为我们应该将 `/tag/:foo` 中的 `:foo` 始终视为一个 slug，并要求使用 `/tag/:foo/:id` 这种格式来表示 ID，其中 `:foo` 可以是任意字符（例如，在不知道或不关心具体值时使用 `-`）。

这将有助于向后兼容，也能在已知 slug 但未知 ID 的情况下提供帮助，这种情况在标签中很常见，因为名称通常是常用的引用方式。

目前，ID 的主要作用是支持本地化。

---

_[View the full topic](https://meta.discourse.org/t/why-do-numerical-tags-fail-in-the-composer-when-id-exists/407955)._
