Uncategorized showing up on mobile

I’ve got a site that has allow uncategorized topics disabled, yet uncategorized shows to a logged out (oh, or logged in as admin) user on Android mobile. I just did a rebuild. Theme components don’t explain it. The problem persists in Safe-Mode. Only official plugins are installed.

I don’t see the problem on Desktop.


1 Like

Did you flush out all the topics from the uncategorized category?


Yeah! It’s just the about topic, no others. I can’t quite make sense of how it could even be possible with the specs that I assume are in place. And it’s just mobile,not desktop.


Can we repro this @tshenry? Sounds like mobile only?


I don’t believe we expect the About topic to remain in Uncategorized when it’s disabled. The warning in the allow uncategorized topics site setting description says (emphasis added):

WARNING: If there are any uncategorized topics, you must recategorize them before turning this off.

Can you try moving the About topic to an active category? That seemed to work on my test site.


Ah. OK. That fixed it.

That’s quite confusing, as it’s normally verboten to delete an about Topic (but I guess it’s not really an about topic because it’s not really a category). But I did, and now Uncategorized doesn’t show anymore. And I had to do it on my phone, because I otherwise couldn’t find it.

Uncategorized is very confusing since it’s NOT a category. I really think it should be off by default.

1 Like

No, because I don’t believe in forcing an artificial Animal, Vegetable, Mineral classification on every single instance in the world right out of the gate. Sorry.

Do heed the warning that is in there for a reason:

WARNING: If there are any uncategorized topics, you must recategorize them before turning this off.

That being said, can we normalize this behavior @zogstrip so it’s consistent between mobile and desktop?

Yeah. I understand that argument, and used to agree, but I think a default category would make more sense than a not-category. But I will try not to suggest that again unless, perhaps, we’re one day in the same space with :beer: .

@nbianca can you add to your list to investigate why the uncategorized was showing on mobile when it wasn’t showing on desktop?


On desktop we show categories and topics separately, but on mobile we show categories with topics, combined. Keeping that in mind, it is this line that causes the bug:


c.displayable_topics.blank? is always true on desktop because we load topics separately so displayable_topics is always blank. On mobile, it is true only if there are really no topics in that category.

We have two solutions here:

  • show uncategorized if there is at least a topic, no matter the value of ‘allow uncategorized topics’ setting

  • hide uncategorized even if there is a topic, if ‘allow uncategorized topics’ is false

The second solution is easier to implement because it means we simply remove the second part of the condition.


I think that hiding the topics that are in uncategorized is (strangely) less confusing than NOT hiding uncategorized when you turn on the setting. I think that if you turn off uncategorized, you’ll notice immediately that all those topics disappeared, but if nothing happens when you turn off uncategorized, then it seems broken.


Let’s go with the easier one because we are close to a release here and I don’t want to do anything too risky.


My vote here is “nuke as much special uncategorized code as possible”. The more we have the more confusing stuff gets.

So I would vote for:

show uncategorized if there is at least a topic, no matter the value of ‘allow uncategorized topics’ setting

Provided the implementation deletes special magic code from Discourse and we carry less edge cases around.

Basically pick the solution that deletes more code from Discourse.

1 Like

I submitted a fix for the bug in the first post:


I went with the first solution because that is the one that deletes some code from Discourse. The other one in fact added code to determine if there is at least one topic in uncategorized category.

I also reviewed all uses of category.uncategorized? and I found a few places that might not be necessary if we made Uncategorized less of a unicorn and more of a category:




These are some parts that do not interfere with other features, which makes the changes less risky, but still not easy.