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.
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.
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.
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.
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 .
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.
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: