Default category

This has been asked a few times before, but is it possible to set it so that new topics actually default to a certain category? I’ve disabled Uncategorized posts, but the user still has to manually select a category and it would be nice to pre-fill that for them.

9 Likes

It would be even nicer if I could set an internal category as the default for team members (to prevent accidental leaking of internal posts) and choose a public default category for normal users.

Maybe a site setting for pick the first category with create permission from this list as the default category for new posts?

4 Likes

Has anyone got a handy workaround for this problem?

I would like to make my discourse a bit ‘oniony’: with a ‘staff’ category, then a ‘members’ category, then a ‘public’ category. But I’m wary of not-too-savvy members unthinkingly posting to the public category. If I could at least set them to a default category, that would be helpful.

Possible workaround:

  1. Disable setting allow uncategorized topics
  2. Change the order of your categories so that the default one is at the top.
  3. New topics will default to the top-most category.

Would this work for you?

2 Likes

Sounds good. I’ll think about that.

Just out of curiosity, what do subcategories ‘do’? Inherit the same rights?

Subcategories do not inherit the same rights, you’ll have to configure them separately. They’re very much a category of their own, except they share a “Latest” page with their fellow sub-categories and their parent category.

2 Likes

ok, thanks. A bit more work for me then :slight_smile:

I tried this and I still get “Pick a category…” in the category dropdown. Do I need to reboot the container or something before the change will take effect.

I just tested this myself and this workaround no longer applies. I’m sure once upon a time we were defaulting to the top-most category when uncategorized was disabled, because it was a real problem in my community. That was later fixed with the addition of the “Select a category” prompt however.

Having a default_category setting that would indeed be nice. It wouldn’t affect order, it would just have that category pre-selected by default.

8 Likes

I have a similar problem. I have a very tiny forum, tried to make it as minimal as possible with no categories. The only category is “forum”. Uncategorised is disabled.

All is good, except for the fact that every new user gets that annoying “You must choose a category” warning when they create a topic, asking them to choose the only possible category.

I’d like to ask a feature request: if only one category is possible in the drop-down, please select that one by default.

(A more flexible alternative would be a “default category” options in settings as others have mentioned).

OK, I was able to almost solve my problem, by

  • allowing uncategorised
  • moving everything over to uncategorised
  • deleting the old category
  • renaming uncategorised

This way the drop down menu doesn’t even display, really nice!

My only problem is how to remove the:
“Topics that don’t need a category, or don’t fit into any other existing category.” text now?

Admin > Customize > Text Content

1 Like

Thanks, I just found it (category.uncategorized_description).

There is a tiny bug related to it.

  1. When I first tried to enter empty string into it, it returned me Error 422 in an error popup.
  2. Many times, the same.
  3. I set it to “a”
  4. Then I set it to empty string, and it worked.

Latest v1.7.0.beta7 +98

How setup defult category topic posting? and can change flexible way?

I’ve disabled the uncategorized category, but people can still post without setting a category. Is there a way to ensure that every thread has a category?

Only staff can do that. Are you sure you’re not mixing up regular users and staff?

Oh, thanks. I didn’t know that regular users see different behavior.

I guess my question is now: how do I prevent staff (including me) from accidentally starting threads without a category?

By … being awesome? You know, the usual

6 Likes

I don’t know if that will produce the desired result. I’m already accidentally posting threads without categories, and the rest of the staff-level users won’t be able to remember.

Is there a way to do it?

Hmm… on my sandbox, I have allow uncategorized topics unchecked and I can’t post in that category… (as an admin, staff, or regular member)

Did you do a hard refresh to make sure the setting took effect?

I also have suppress uncategorized badge unchecked, not sure if that matters, I wouldn’t think it would.