# 尝试在类别中强制执行每个主题1个标签

**URL:** <https://meta.discourse.org/t/attempting-to-enforce-1-tag-per-topic-in-a-category/172702>\
**Category:** Support\
**Created:** [2020年十二月9日 02:57 UTC](https://meta.discourse.org/t/attempting-to-enforce-1-tag-per-topic-in-a-category/172702 "2020-12-09T02:57:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunjam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sunjam/32/175682_2.png) [@sunjam](https://meta.discourse.org/u/sunjam)\
**Post date:** [2020年十二月9日 02:57 UTC](https://meta.discourse.org/t/attempting-to-enforce-1-tag-per-topic-in-a-category/172702/1 "2020-12-09T02:57:27Z")

</div>

> [@The option to enforce tagging](https://meta.discourse.org/t/the-option-to-enforce-tagging/69527/14):
>
> Excellent news. Def per category. Both if that’s easy enough I guess. Not sure I do either but I think it makes sense that if tags are required that the tag field below says something like “Add at least one tag”

用户在特定分类下发布新主题时，仍然未被强制要求_从定义的标签组中使用至少一个标签_。这些标签应仍可在其他分类中使用。以下是我们尝试强制执行的分类设置：

 ![tags-category-requirement](https://global.discourse-cdn.com/meta/original/3X/5/b/5bf2b59d8462c05b4da6e02dfd0f64054a7335bf.png)

标签组设置

 ![tag-group-settings](https://global.discourse-cdn.com/meta/original/3X/f/5/f5ee2fe3c2a45cc7b8959ebd73e9d87661b2d4ee.png)

非常感谢任何建议与帮助！

---

<div class="post-metadata">

**Author:** ![leandrodimarco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leandrodimarco/32/206417_2.png) [@leandrodimarco](https://meta.discourse.org/u/leandrodimarco)\
**Post date:** [2021年三月4日 02:05 UTC](https://meta.discourse.org/t/attempting-to-enforce-1-tag-per-topic-in-a-category/172702/2 "2021-03-04T02:05:42Z")

</div>

我遇到了同样的问题。  
在不同用户下表现一致。

请问是否有解决此问题的方法或可用的修复方案？

我使用的是版本 2.7.0.beta2  
([fcbb6c4143](https://github.com/discourse/discourse/commits/fcbb6c414338c4aa3cc6b0708984918541ee0389))

提前感谢，

---

<div class="post-metadata">

**Author:** ![leandrodimarco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leandrodimarco/32/206417_2.png) [@leandrodimarco](https://meta.discourse.org/u/leandrodimarco)\
**Post date:** [2021年三月4日 14:01 UTC](https://meta.discourse.org/t/attempting-to-enforce-1-tag-per-topic-in-a-category/172702/3 "2021-03-04T14:01:03Z")

</div>

我运行了几次测试，但仍无法强制按类别进行标签管理。  
这一功能对我们即将开展的一个特定用例将大有裨益。

我当前的设置如下：

1. 类别菜单 \> 设置

 ![image](https://global.discourse-cdn.com/meta/original/3X/9/4/9493d617e51efbf5445b1a35d21ff45b38a011f7.png)

1. 类别菜单 \> 标签

 ![image](https://global.discourse-cdn.com/meta/original/3X/c/f/cf20898b363064df437ff101a399d9f8bba09de9.png)

请告诉我是否遗漏了某些内容或设置。

另外，如果能提供针对“每个标签组中标签数量”的更细粒度设置，将会非常有帮助。您不这么认为吗？

---

<div class="post-metadata">

**Author:** ![leandrodimarco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leandrodimarco/32/206417_2.png) [@leandrodimarco](https://meta.discourse.org/u/leandrodimarco)\
**Post date:** [2021年三月4日 17:07 UTC](https://meta.discourse.org/t/attempting-to-enforce-1-tag-per-topic-in-a-category/172702/4 "2021-03-04T17:07:28Z")

</div>

不确定是否应该编辑我对这个话题的先前回复并添加这条新信息……  
不过还是在这里分享一下。

我不知道发生了什么……我重新开始了一切。  
我创建了一组新的标签、几个标签组和规则。  
现在它按预期运行，并显示了漂亮的红色警告……

抱歉误报了。

 ![image](https://global.discourse-cdn.com/meta/original/3X/4/0/40a6a85c574136935206800560527ffbbd7fe51c.png)

---

<div class="post-metadata">

**Author:** ![jeromecc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jeromecc/32/153571_2.png) [@jeromecc](https://meta.discourse.org/u/jeromecc)\
**Post date:** [2021年十二月12日 23:40 UTC](https://meta.discourse.org/t/attempting-to-enforce-1-tag-per-topic-in-a-category/172702/5 "2021-12-12T23:40:24Z")

</div>

1个主题的最小标签组在这里也没有强制执行，尽管进行了无数次调整、重新创建组等… ☹  
好的，我的错，我正在从管理员帐户进行测试 🙂

> 请注意，“类别上的最小标签验证”将不会发生，如果：
> 
> - 全局禁用了标签
> - 操作用户是工作人员
> - 操作用户没有足够的信任级别来使用/添加标签

来自 [How can I make the "tags" as REQUIRED when create a new Topic - #2 by techAPJ](https://meta.discourse.org/t/how-can-i-make-the-tags-as-required-when-create-a-new-topic/106149/2)
