# カテゴリ定義の削除/無効化

**URL:** https://meta.discourse.org/t/remove-disable-category-definitions/118970
**Category:** Support
**Created:** [2019 年 5 月 29 日午前 9:48 UTC](https://meta.discourse.org/t/remove-disable-category-definitions/118970 "2019-05-29T09:48:49Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![calebs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/calebs/32/148838_2.png) [@calebs](https://meta.discourse.org/u/calebs)
#### Post date: [2019 年 5 月 29 日午前 9:48 UTC](https://meta.discourse.org/t/remove-disable-category-definitions/118970/1 "2019-05-29T09:48:49Z")

</div>

Since it is a general forum, we are adding tons of new categories and subcategories every day and would really want to disable these automatic Category Definition posts as we don’t need them. We can’t seem to find a delete option for them, so the only way to do it is to flag, review and delete from there. It just gets annoying when there are over 200 new subcategories every day. Any tips on how to disable these?

---

<div class="post-metadata">

### Author: ![Thomas\_G](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thomas_g/32/200158_2.png) [@Thomas\_G](https://meta.discourse.org/u/Thomas_G)
#### Post date: [2019 年 5 月 29 日午前 11:32 UTC](https://meta.discourse.org/t/remove-disable-category-definitions/118970/2 "2019-05-29T11:32:27Z")

</div>

The category definitions are something that must not be deleted. Because we had the same issue, we just closed and unlisted the category definitions, meaning that only mods/staff could see them.

* * *

If I were you, I would make sure I check the post below. I am sure you will find it helpful:

> [@Want to delete 'About this Topic'](https://meta.discourse.org/t/want-to-delete-about-this-topic/112391/9):
>
> As described, you cannot delete it, as it would break things. You can use this code at the rails console to unlist all about topics: cats = Category.all cats.each do |cat| puts "Process #{cat.name} -- #{cat.topic\_id}" if cat.topic\_id.to\_i \> 0 t = Topic.find(cat.topic\_id) t.visible=false t.save end end If you want it only for some categories, you’ll need to adjust the code. If you want it to happen automatically, you’d need a plugin that did something like the above on a re…

---

<div class="post-metadata">

### Author: ![calebs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/calebs/32/148838_2.png) [@calebs](https://meta.discourse.org/u/calebs)
#### Post date: [2019 年 5 月 29 日午後 12:19 UTC](https://meta.discourse.org/t/remove-disable-category-definitions/118970/3 "2019-05-29T12:19:35Z")

</div>

Yeah, but we definitely can’t edit these for over 450 categories. It is physically impossible, and the fact that we’ve manually translated the entire system, makes it even harder. We’ve flagged/deleted more than 60 so far and nothing broke. It’s just we need a team just for that and I don’t see a reason why we can’t delete or disable them. They open hours of extra work and we’d rather spend our time growing the community.

---

<div class="post-metadata">

### Author: ![justin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin/32/157614_2.png) [@justin](https://meta.discourse.org/u/justin)
#### Post date: [2019 年 5 月 29 日午後 1:29 UTC](https://meta.discourse.org/t/remove-disable-category-definitions/118970/4 "2019-05-29T13:29:32Z")

</div>

The reason you shouldn’t delete them is they are inherently tied to the definition of the category itself. It can cause things to break down the road even though you might not see anything right now.

Also, have you considered creating tags instead of lots of categories? Having 200+ new categories _a day_ is going to cause some strain on your site long term, plus make it difficult for new community members to figure out where to post stuff, whereas tags are a bit more freeform and can be restricted to specific categories.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2019 年 5 月 29 日午後 2:01 UTC](https://meta.discourse.org/t/remove-disable-category-definitions/118970/5 "2019-05-29T14:01:50Z")

</div>

My post linked above shows how to unlist them all at once.

You don’t want hundreds of categories.

Deleting those topics will result in pain.

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [2019 年 5 月 29 日午後 2:07 UTC](https://meta.discourse.org/t/remove-disable-category-definitions/118970/6 "2019-05-29T14:07:19Z")

</div>

The delete button is removed for good reason, did its absence give you any pause to consider whether asking to remove them was advisable? If you delete those definitions then _you’ve effectively broken those categories_, all you needed to do was unlist them.

Your best option will be to create replacement categories and bulk migrate the posts back to them. We won’t be able to support you with things left in that state.

Why do you have 450 categories? Are you migrating an existing community with a high volume of posts?

---

<div class="post-metadata">

### Author: ![calebs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/calebs/32/148838_2.png) [@calebs](https://meta.discourse.org/u/calebs)
#### Post date: [2019 年 5 月 29 日午後 3:18 UTC](https://meta.discourse.org/t/remove-disable-category-definitions/118970/7 "2019-05-29T15:18:46Z")

</div>

Did not know that. Is it possible to recover them now? We’ve flagged/deleted everything. Had no idea that could cause issues.

As I’ve mentioned, it’s a general forum and we do need all these subcategories, tags don’t work for us. Any suggestions?

Update: So, a team member suggested adding general rules to these descriptions. My question is. Is there a way to recover all deleted ones or shall I create new categories and move existic topics there, then delete the “broken ones”?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2019 年 5 月 29 日午後 11:34 UTC](https://meta.discourse.org/t/remove-disable-category-definitions/118970/8 "2019-05-29T23:34:29Z")

</div>

If you deleted the topics from the ui then they should be in the database and be able I be undeleted, I think.

Can admins see the deleted topics?

You’ll need to do it in the rails console.

See [It's Time We Talked About Tags](https://meta.discourse.org/t/its-time-we-talked-about-tags/72467). Having hundreds of categories is almost always a bad idea unless you’re sure that people will want to be able to use categories to ignore most of your content.

---

<div class="post-metadata">

### Author: ![calebs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/calebs/32/148838_2.png) [@calebs](https://meta.discourse.org/u/calebs)
#### Post date: [2019 年 5 月 29 日午後 11:37 UTC](https://meta.discourse.org/t/remove-disable-category-definitions/118970/9 "2019-05-29T23:37:15Z")

</div>

@pfaffman Already moved all existing topics to a temporary category, deleted everything and started from scratch. We’ve added main categories and less subcategories + tags. Seems to be a better idea. Thanks for all the suggestions and support.

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [2019 年 5 月 30 日午後 1:41 UTC](https://meta.discourse.org/t/remove-disable-category-definitions/118970/10 "2019-05-30T13:41:09Z")

</div>

Yep tags are the way to go. If you don’t have lots of topics and activity within your categories you’re just building a graveyard.

---

<div class="post-metadata">

### Author: ![calebs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/calebs/32/148838_2.png) [@calebs](https://meta.discourse.org/u/calebs)
#### Post date: [2019 年 5 月 30 日午後 2:35 UTC](https://meta.discourse.org/t/remove-disable-category-definitions/118970/11 "2019-05-30T14:35:47Z")

</div>

Wouldn’t call a community with 31k existing members a graveyard, but yeah, fair points.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [2022 年 10 月 23 日午前 3:22 UTC](https://meta.discourse.org/t/remove-disable-category-definitions/118970/13 "2022-10-23T03:22:36Z")

</div>


