Unlogged visitors able to see and access disabled Uncategorized category (only in mobile browsers!):
You may ensure that it does not appear in desktop browsers.
The issue involves unlogged mobile users seeing the disabled āUncategorizedā category on Discourse forums, while desktop browsers hide it ā an inconsistency flagged by Ivan_Rapekas. jomaxro notes the discrepancy and questions whether itās CSS or structural, prompting awesomerobot to suggest the category should be removed from HTML entirely when disabled. j.jaffeux debugs the issue, tracing it to a mobile/desktop divergence in category rendering logic tied to a desktop-only setting, which affects topic display and category visibility. He proposes adding awareness of the āallow uncategorized topicsā setting but acknowledges itās misleading and not worth heavy investment. [sam](/t/-/81181/3, /t/-/81181/7) strongly advocates eliminating the āUncategorizedā settings entirely, suggesting instead hiding its badge via CSS and letting admins delete the category outright ā a simpler, cleaner approach. codinghorror clarifies this isnāt a bug: if topics remain uncategorized after disabling the category, theyāll still appear ā the fix is to recategorize them. Ivan_Rapekas confirms recategorizing resolved the issue but notes the oddity that mobile unlogged users still see it while desktop doesnāt ā highlighting the inconsistency despite the technical correctness.
Unlogged visitors able to see and access disabled Uncategorized category (only in mobile browsers!):
You may ensure that it does not appear in desktop browsers.
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?
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.
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ā¦
I spent some time debugging this⦠and it was way more fiddly than expected.
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
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
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?
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.
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.
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.