# Uncategorized shows up in Categories menu and results in 404

**URL:** https://meta.discourse.org/t/uncategorized-shows-up-in-categories-menu-and-results-in-404/31569
**Category:** Bug
**Created:** [2015 年7 月 30 日 16:28 UTC](https://meta.discourse.org/t/uncategorized-shows-up-in-categories-menu-and-results-in-404/31569 "2015-07-30T16:28:52Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### 作者： ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### 发布日期： [2015 年7 月 30 日 16:28 UTC](https://meta.discourse.org/t/uncategorized-shows-up-in-categories-menu-and-results-in-404/31569/1 "2015-07-30T16:28:52Z")

</div>

![](https://global.discourse-cdn.com/meta/original/3X/9/b/9b10574ce3c3e4550ade666dec0a9072afd7d43f.gif) 

> [@neil](#):
>
> I made these changes today. If `allow_uncategorized_topics` is unchecked:
> 
> - Uncategorized will always show up on hamburger menu for staff.
> - Uncategorized will not show up for non-staff unless there are topics there.
> - Also, staff weren’t able to make uncategorized topics, so I gave them that superpower.

Judging from the above quote, the topic is supposed to show up but I don’t think it should trigger a 404 when an admin clicks on it.

Also, I’m seeing now that if `allow_uncategorized_topics` is unchecked:

- Uncategorized **does not** show up in the hamburger menu for staff.

---

<div class="post-metadata">

### 作者： ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### 发布日期： [2015 年7 月 30 日 16:32 UTC](https://meta.discourse.org/t/uncategorized-shows-up-in-categories-menu-and-results-in-404/31569/2 "2015-07-30T16:32:24Z")

</div>

![](https://global.discourse-cdn.com/meta/original/3X/b/2/b2610a708ed4ff02794530da32b16bc8f92eeea1.gif) 

Hmm ok most likely a bug. Breaks when not signed in too.

---

<div class="post-metadata">

### 作者： ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### 发布日期： [2015 年7 月 30 日 20:55 UTC](https://meta.discourse.org/t/uncategorized-shows-up-in-categories-menu-and-results-in-404/31569/3 "2015-07-30T20:55:16Z")

</div>

I believe that categories page is heavily cached, so you may need to wait a day or two (or clear the cache) for it to disappear.

---

<div class="post-metadata">

### 作者： ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### 发布日期： [2015 年7 月 30 日 21:06 UTC](https://meta.discourse.org/t/uncategorized-shows-up-in-categories-menu-and-results-in-404/31569/4 "2015-07-30T21:06:34Z")

</div>

I agree, I do not think this is a bug but a caching issue, categories page is heavily cached.

---

<div class="post-metadata">

### 作者： ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### 发布日期： [2015 年7 月 30 日 21:30 UTC](https://meta.discourse.org/t/uncategorized-shows-up-in-categories-menu-and-results-in-404/31569/5 "2015-07-30T21:30:53Z")

</div>

I think the bug is that we have the `allow_uncategorized_topics` option in the first place, this option is hack soup.

---

<div class="post-metadata">

### 作者： ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### 发布日期： [2015 年7 月 30 日 22:04 UTC](https://meta.discourse.org/t/uncategorized-shows-up-in-categories-menu-and-results-in-404/31569/6 "2015-07-30T22:04:49Z")

</div>

Would it be better to leave it on always and have an Edit Category option to hide the category? We need that anyway for 1.4

---

<div class="post-metadata">

### 作者： ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### 发布日期： [2015 年7 月 30 日 22:24 UTC](https://meta.discourse.org/t/uncategorized-shows-up-in-categories-menu-and-results-in-404/31569/7 "2015-07-30T22:24:02Z")

</div>

I think the best approach is to remove all the “special” uncategorized handling stuff and just have it ship as a regular editable category, do the special suppression via css controlled by a site setting.

Every few days someone has an issue with uncategorized we got to fix the root cause instead of adding more hack.

---

<div class="post-metadata">

### 作者： ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### 发布日期： [2015 年7 月 30 日 23:05 UTC](https://meta.discourse.org/t/uncategorized-shows-up-in-categories-menu-and-results-in-404/31569/8 "2015-07-30T23:05:26Z")

</div>

> [@sam](#):
>
> I think the best approach is to remove all the “special” uncategorized handling stuff and just have it ship as a regular editable category, do the special suppression via css controlled by a site setting.

I completely agree with this. There is little reason to have Uncategorized behave special. Sure you always need a category to be assigned to a Topic, but if someone removes all categories from their instance, surely an error will occur when they try to create a new topic and can’t assign a category.

By default, Discourse should continue to ship with an Uncategorized category, just make it a regular one though and not special. That way, anyone could technically delete it and just create another category that would be their default or whatever.

I’ve seen a fair share of uncategory logic when I’ve been in and out and I must say, it always felt like walking on pins and needles when you had to alter code that was dealing with Uncategorized.

---

<div class="post-metadata">

### 作者： ![purldator](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@purldator](https://meta.discourse.org/u/purldator)
#### 发布日期： [2015 年7 月 30 日 23:30 UTC](https://meta.discourse.org/t/uncategorized-shows-up-in-categories-menu-and-results-in-404/31569/9 "2015-07-30T23:30:22Z")

</div>

I have mentioned this before:

[https://meta.discourse.org/t/topic-silently-failing-to-be-moved-to-a-specific-category/27285/33?u=purldator](https://meta.discourse.org/t/topic-silently-failing-to-be-moved-to-a-specific-category/27285/33)

---

<div class="post-metadata">

### 作者： ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### 发布日期： [2015 年7 月 31 日 00:05 UTC](https://meta.discourse.org/t/uncategorized-shows-up-in-categories-menu-and-results-in-404/31569/10 "2015-07-31T00:05:17Z")

</div>

> [@cpradio](#):
>
> I believe that categories page is heavily cached, so you may need to wait a day or two (or clear the cache) for it to disappear.

> [@codinghorror](#):
>
> I agree, I do not think this is a bug but a caching issue, categories page is heavily cached.

I don’t think it is cached as hard refreshing and clearing the cache folder in rails didn’t help.

---

<div class="post-metadata">

### 作者： ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### 发布日期： [2015 年7 月 31 日 00:07 UTC](https://meta.discourse.org/t/uncategorized-shows-up-in-categories-menu-and-results-in-404/31569/11 "2015-07-31T00:07:14Z")

</div>

> [@tgxworld](#):
>
> I don’t think it is cached as hard refreshing and clearing the cache folder in rails didn’t help.

They aren’t referring to the browser cache, but the server cache.

---

<div class="post-metadata">

### 作者： ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### 发布日期： [2015 年7 月 31 日 00:09 UTC](https://meta.discourse.org/t/uncategorized-shows-up-in-categories-menu-and-results-in-404/31569/12 "2015-07-31T00:09:11Z")

</div>

> [@tgxworld](#):
>
> clearing the cache folder in rails

I flushed `Redis` and cleared the `tmp/cache` folder in Rails too. :sadpanda:

---

<div class="post-metadata">

### 作者： ![ljpp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ljpp/32/96506_2.png) [@ljpp](https://meta.discourse.org/u/ljpp)
#### 发布日期： [2015 年12 月 15 日 14:10 UTC](https://meta.discourse.org/t/uncategorized-shows-up-in-categories-menu-and-results-in-404/31569/14 "2015-12-15T14:10:37Z")

</div>

What is the status of “Uncategorized”? This bug is still reproducable in the **stable** branch [as of today](http://tappara.co/categories). I see no use for it, and would like to get rid of it.

---

<div class="post-metadata">

### 作者： ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### 发布日期： [2022 年7 月 21 日 05:45 UTC](https://meta.discourse.org/t/uncategorized-shows-up-in-categories-menu-and-results-in-404/31569/15 "2022-07-21T05:45:08Z")

</div>

我认为我们已经解决了这个问题。

---

<div class="post-metadata">

### 作者： ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### 发布日期： [2022 年7 月 21 日 05:45 UTC](https://meta.discourse.org/t/uncategorized-shows-up-in-categories-menu-and-results-in-404/31569/16 "2022-07-21T05:45:10Z")

</div>


