I deleted "uncategorized". Is this bad?

(Peter Jaros) #1

I just set up a new Discourse install. While I was configuring my categories, I thought I wasn’t going to want uncategorized topics, so I deleted the category “uncategorized”.

Now I’ve decided that I do want to allow uncategorized topics after all. I have allow_uncategorized_topics checked, but I don’t have a category named “uncategorized”. When I create a topic, I can give it “(no category)”.

I can then edit a “(no category)” topic and give it a category.


If I edit a categorized topic and set it to “(no category)”, it doesn’t remove the category. It appears to, but if I go back to the topic list, the category’s still there. If I return to the topic, the category is in fact back.

Did I work myself into a bad state? Should “uncategorized” not have been deletable?

Uncategorized "pinned" post not shown for anon user?
(Jacob) #2

I want to delete uncategorized, I hate it.

(Sam Saffron) #3

Why not untick allow_uncategorized_category then?

(Jacob) #4

I have, but it still shows up on the Category page and it’s still listed in the hamburger menu.

(Sam Saffron) #5

For regular users or for mods? Do you have any uncategorized topics?

Recategorizing this as a bug since you should not be able to delete system resources, even as admin.

(Jacob) #6

For regular users, uncategorized is in the last position of the hamburger menu. When clicked, it brings up the There are no more uncategorized topics. page. It does not show up on the Categories page though, which is good.

For admins, uncategorized is in the fourth position. It is set to default position and I have the 3 tags positioned absolutely. Also, we can see the uncategorized category on the category page. like this.

I moved the topics that were in there out, but it still shows user avatars.

Sorry for kinda hijacking this topic.

Uncategorized topics not allowed, still seeing tag places
(Peter Jaros) #7

To clarify: the category named “uncategorized” should not have been deletable?

As a workaround, is there a way to recreate it?

(Peter Jaros) #8

Also, if I hadn’t deleted “uncategorized”, would topics with “(no category)” appear to be in that category?

(Martin) #9

I don’t think so. However I wouldn’t fully know.

Using an educated guess (looking at the forum here) there are some topics down the line with no category selection. This would suggest that those were the ones created with (no category).

(Jeff Atwood) #10

Not hijacking at all, if a forum admin has disabled uncategorized, we should not be showing it as an option in the UI pretty much anywhere @sam.

Also it REALLY should not be possible to delete the uncategorized category @Neil. This has come up before…

(Régis Hanol) #11

For the record, there’s a PR preventing the deletion of the uncategorized category but it currently has merge conflicts.

(Ryan Vergeront) #12

I (hopefully) fixed the merge conflict on this pull request if anyone would like to take a look once the CI finishes.

(Peter Jaros) #13

So, what’s the intended difference between a topic in the uncategorized category and a topic which has no category?

(Jeff Atwood) #14

No difference, we needed that to simplify the code paths.

(Peter Jaros) #15

I think I’m still missing something. Why am I unable to edit a categorized topic to give it “(no category)”? Is that its own bug?

(Sam Saffron) #16

Sound like our bug, will ensure that rake db:migrate enforces the existence of the uncategorized category.

(Sam Saffron) #17

Progress here:

You can no longer delete uncategorized from the UI: Prevent deleting 'uncategorized' category by verg · Pull Request #1744 · discourse/discourse · GitHub

If you somehow deleted it, it will come back on migrate: BUGFIX: if users somehow deleted the uncategorized category, it is re… · discourse/discourse@3681f69 · GitHub

see also: Uncategorized "pinned" post not shown for anon user?

(Peter Jaros) #18

Thanks! I updated and migrated, and it’s back.

(Peter Jaros) #19

However, I can still set a topic to “(no category)”.

I guess I don’t understand: what’s the point of a category called “uncategorized” if posts are allowed to actually not have a category?

(Peter Jaros) #20

Oh! I get it.

You can’t actually give a topic “Uncategorized”. Navigating to that category shows you topics which have “(no category)”. I think before I saw “Uncategorized” in the list of categories to set for a topic, but if so, that was a bug which was fixed by these changes.

Sorry for the spewed posts.