# Disabled Uncategorized category is shown in mobile browsers when unlogged

**URL:** https://meta.discourse.org/t/disabled-uncategorized-category-is-shown-in-mobile-browsers-when-unlogged/81181
**Category:** Support
**Created:** [21 בפברואר,‏ 2018,‏ 9:16pm UTC](https://meta.discourse.org/t/disabled-uncategorized-category-is-shown-in-mobile-browsers-when-unlogged/81181 "2018-02-21T21:16:44Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Ivan\_Rapekas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ivan_rapekas/32/248924_2.png) [@Ivan\_Rapekas](https://meta.discourse.org/u/Ivan_Rapekas)
#### Post date: [21 בפברואר,‏ 2018,‏ 9:16pm UTC](https://meta.discourse.org/t/disabled-uncategorized-category-is-shown-in-mobile-browsers-when-unlogged/81181/1 "2018-02-21T21:16:45Z")

</div>

Unlogged visitors [able to see and access](https://www.cuba-platform.com/discuss) disabled Uncategorized category (only in mobile browsers!):

 ![Screenshot_20180220-190700](https://global.discourse-cdn.com/meta/original/3X/2/8/286f062c54f0242c9f8b4cf18f7cfd5fe0aa5da4.png)

You may ensure that it does not appear in desktop browsers.

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [22 בפברואר,‏ 2018,‏ 12:12am UTC](https://meta.discourse.org/t/disabled-uncategorized-category-is-shown-in-mobile-browsers-when-unlogged/81181/2 "2018-02-22T00:12:01Z")

</div>

That’s strange, we’re definitely inconsistent here. We don’t show the uncategorized section on desktop but do on mobile when disabled via site settings. Is this CSS related @awesomerobot, or is it a structure issue?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [22 בפברואר,‏ 2018,‏ 12:14am UTC](https://meta.discourse.org/t/disabled-uncategorized-category-is-shown-in-mobile-browsers-when-unlogged/81181/3 "2018-02-22T00:14:44Z")

</div>

Every bug I see about uncategorized just makes me want to remove the settings and special magic uncategorized sauce from Discourse. This has been plaguing us for 5 years now.

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [22 בפברואר,‏ 2018,‏ 1:20am UTC](https://meta.discourse.org/t/disabled-uncategorized-category-is-shown-in-mobile-browsers-when-unlogged/81181/4 "2018-02-22T01:20:44Z")

</div>

Nah, it should be removed from the HTML entirely when disabled. Not sure why the logic would be different here in one mobile template when it seems to work everywhere else…

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [27 בפברואר,‏ 2018,‏ 4:59pm UTC](https://meta.discourse.org/t/disabled-uncategorized-category-is-shown-in-mobile-browsers-when-unlogged/81181/6 "2018-02-27T16:59:17Z")

</div>

I spent some time debugging this… and it was way more fiddly than expected.

[https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/routes/discovery-categories.js.es6#L16](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/routes/discovery-categories.js.es6#L16)

This line will be different from mobile and desktop, resulting in a `false` on mobile as is very rightly showing the name of the setting: “ **DESKTOP** category page style”.

In the end this code is never using any Uncategorized related site setting. But this difference in style will in one case trigger this or not: [discourse/app/models/category\_list.rb at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/app/models/category_list.rb#L19)  
Which will then make `displayable_topics` blank in one case and not the other [discourse/app/models/category\_list.rb at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/app/models/category_list.rb#L136)  
Resulting some category being deleted on desktop and not on mobile.

So we could add some knowledge of `allow uncategorized topics` but the name seems misleading (is there another setting to use for this?) and then I don’t think we want to spend so much time on this as it’s kind of an edge case and not so bad, and still making us spend more time on “Uncategorized”.

@sam Maybe we could make it pr-welcome?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [28 בפברואר,‏ 2018,‏ 1:04am UTC](https://meta.discourse.org/t/disabled-uncategorized-category-is-shown-in-mobile-browsers-when-unlogged/81181/7 "2018-02-28T01:04:00Z")

</div>

> [@j.jaffeux](#):
>
> So we could add some knowledge of allow uncategorized topics but the name seems misleading

This only big thing I support at this moment is deleting that site settings and shipping with a CSS rule that hides the badge from pre-seeded uncategorized slug.

Then all we need to do to remove uncategorized is delete it which makes much more sense rather than the huge amount of uncategorized contortion we have today.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [9 ביולי,‏ 2018,‏ 8:37am UTC](https://meta.discourse.org/t/disabled-uncategorized-category-is-shown-in-mobile-browsers-when-unlogged/81181/8 "2018-07-09T08:37:44Z")

</div>

Not a bug.

If you “disable” uncategorized but have not assigned a category to all the previously uncategorized topics, then.. well, this is as expected. Recategorize the “welcome to cuba forum” topic.

---

<div class="post-metadata">

### Author: ![Ivan\_Rapekas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ivan_rapekas/32/248924_2.png) [@Ivan\_Rapekas](https://meta.discourse.org/u/Ivan_Rapekas)
#### Post date: [9 ביולי,‏ 2018,‏ 10:06am UTC](https://meta.discourse.org/t/disabled-uncategorized-category-is-shown-in-mobile-browsers-when-unlogged/81181/9 "2018-07-09T10:06:12Z")

</div>

Hi @codinghorror,  
Thank you for your attention to this problem! My fault was leaving my topic uncategorized while I disabled uncatecorized topics at all. After recategorizing this category has disappeared, as expected. Anyway, that’s weird, when desktop browser does not show the stuff, but mobile browser does and only for unlogged users.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [9 ביולי,‏ 2018,‏ 10:10am UTC](https://meta.discourse.org/t/disabled-uncategorized-category-is-shown-in-mobile-browsers-when-unlogged/81181/10 "2018-07-09T10:10:05Z")

</div>


