# Default Composer Category component

**URL:** https://meta.discourse.org/t/default-composer-category-component/148048
**Category:** Theme component
**Tags:** end-of-life
**Created:** [April 15, 2020, 2:01am UTC](https://meta.discourse.org/t/default-composer-category-component/148048 "2020-04-15T02:01:33Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [April 15, 2020, 2:01am UTC](https://meta.discourse.org/t/default-composer-category-component/148048/1 "2020-04-15T02:01:33Z")

</div>

Repository at [GitHub - discourse/discourse-default-composer-category · GitHub](https://github.com/pmusaraj/discourse-default-composer-category)

```plaintext
https://github.com/pmusaraj/discourse-default-composer-category

```

Install this theme component

### What this does?

This is a very simple theme component that does only one thing: it lets administrators set a category as the default category for the composer. It’s most useful for sites that have disabled the Uncategorized category and would like another category to be automatically selected when launching the composer.

### How to configure it

The configuration asks for the category id for the default category.

 ![image](https://global.discourse-cdn.com/meta/original/4X/2/f/c/2fc9a8203ed2e1f25c9a2b3ef9eb0e3f07ccdab6.png)

You can find out the id for the category by navigating to the category page for that category and taking the last number in the URL, e.g. `/c/site-feedback/2` → 2.

---

<div class="post-metadata">

### Author: ![tpetrov](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tpetrov/32/164643_2.png) [@tpetrov](https://meta.discourse.org/u/tpetrov)
#### Post date: [May 29, 2020, 6:30am UTC](https://meta.discourse.org/t/default-composer-category-component/148048/2 "2020-05-29T06:30:27Z")

</div>

Great component, thank you!

One issue I have though is that for the category I selected I have set _Minimum number of tags required in a topic_ to one. Still it lets me create a topic without adding a tag.

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [May 29, 2020, 3:55pm UTC](https://meta.discourse.org/t/default-composer-category-component/148048/3 "2020-05-29T15:55:44Z")

</div>

Thanks for the bug report @tpetrov, it should now be fixed via:

[https://github.com/pmusaraj/discourse-default-composer-category/commit/aa30def362501f67ae06541ae62597a32bae8ac7](https://github.com/pmusaraj/discourse-default-composer-category/commit/aa30def362501f67ae06541ae62597a32bae8ac7)

---

<div class="post-metadata">

### Author: ![tpetrov](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tpetrov/32/164643_2.png) [@tpetrov](https://meta.discourse.org/u/tpetrov)
#### Post date: [May 29, 2020, 4:13pm UTC](https://meta.discourse.org/t/default-composer-category-component/148048/4 "2020-05-29T16:13:23Z")

</div>

Wow, that was real quick. Thanks a bunch!!

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 14, 2022, 11:36am UTC](https://meta.discourse.org/t/default-composer-category-component/148048/5 "2022-02-14T11:36:20Z")

</div>

I’ve just noticed this. This is fantastic.

Here’s my vote for disabling `uncategorized` by default and moving this to core.

---

<div class="post-metadata">

### Author: ![elsbeth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elsbeth/32/256471_2.png) [@elsbeth](https://meta.discourse.org/u/elsbeth)
#### Post date: [April 11, 2022, 4:09pm UTC](https://meta.discourse.org/t/default-composer-category-component/148048/6 "2022-04-11T16:09:17Z")

</div>

Hey @pmusaraj, I just installed this component on my forum and wondering if you could clarify the set-up for me. It’s not clear what format the “default composer category id” should be in – I tried the name of the category and also the URL, and neither seem to work.

 ![Screen Shot 2022-04-11 at 9.07.30 AM](https://global.discourse-cdn.com/meta/original/4X/8/9/1/891fe90780f845b89b972969aee5f574e91689b8.png)

What ID should I be using?

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [April 11, 2022, 4:16pm UTC](https://meta.discourse.org/t/default-composer-category-component/148048/7 "2022-04-11T16:16:27Z")

</div>

I would try 22.

---

<div class="post-metadata">

### Author: ![elsbeth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elsbeth/32/256471_2.png) [@elsbeth](https://meta.discourse.org/u/elsbeth)
#### Post date: [April 11, 2022, 4:31pm UTC](https://meta.discourse.org/t/default-composer-category-component/148048/8 "2022-04-11T16:31:22Z")

</div>

Thanks, @Moin, that fixed it.

---

<div class="post-metadata">

### Author: ![mattdm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mattdm/32/216484_2.png) [@mattdm](https://meta.discourse.org/u/mattdm)
#### Post date: [September 30, 2022, 4:39pm UTC](https://meta.discourse.org/t/default-composer-category-component/148048/9 "2022-09-30T16:39:17Z")

</div>

I would love to have the ability to assign a _default default category_, but then allow users to select their preferred personal default individually. Has anyone else had this thought, or have ideas on how to do it?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [September 30, 2022, 5:53pm UTC](https://meta.discourse.org/t/default-composer-category-component/148048/10 "2022-09-30T17:53:15Z")

</div>

I would love this too. I think uncategorized, the un-category is very confusing. I was hoping that new new #General was going to be a default category to replace #Uncategorized rather than an oddly named replacement for lounge.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [September 30, 2022, 5:54pm UTC](https://meta.discourse.org/t/default-composer-category-component/148048/11 "2022-09-30T17:54:06Z")

</div>

> [@pfaffman](#):
>
> I was hoping that new new #General was going to be a default category to replace #Uncategorized rather than an oddly named replacement for lounge.

I believe it will be soon. 🙂

---

<div class="post-metadata">

### Author: ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)
#### Post date: [September 30, 2022, 6:30pm UTC](https://meta.discourse.org/t/default-composer-category-component/148048/13 "2022-09-30T18:30:45Z")

</div>

> [@pfaffman](#):
>
> I was hoping that new new #General was going to be a default category to replace #Uncategorized rather than an oddly named replacement for lounge.

This is a very fresh change and was just merged in. General is now the default category in the composer on _NEW_ sites.

[https://github.com/discourse/discourse/pull/18383](https://github.com/discourse/discourse/pull/18383)

> [@mattdm](#):
>
> but then allow users to select their preferred personal default individually.

This doesn’t exist _yet_, but I’m open to adding it!

For existing sites I’ll have to come up with a plan on how they can get the default category feature. Right now it requires disabling the `allow_uncategorized_topics`, but then it will also require that the General category exists and that the hidden site setting `general_category_id` is set, but if admins could customize which category was the default this would make it easier for existing sites to get this functionality and possibly get it to work with uncategorized enabled still.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [September 30, 2022, 6:54pm UTC](https://meta.discourse.org/t/default-composer-category-component/148048/14 "2022-09-30T18:54:41Z")

</div>

> [@blake](#):
>
> This is a very fresh change and was just merged in. General is now the default category in the composer on _NEW_ sites.

Oh! Hooray! That’s what I’d originally thought. I’m 🕺 that this is what happened.

> [@blake](#):
>
> Right now it requires disabling the `allow_uncategorized_topics`, but then it will also require that the General category exists

Yeah. That is rather complicated, but I don’t see an easy way around it.

. . . wait

> [@blake](#):
>
> that the hidden site setting `general_category_id` is set

Wait. Wait! Wait!!! Why is that hidden? 😕 Why not just let people choose any old category as the default from a category pulldown? Why did we call it `general_category_id` rather than `default_category_id`? It wouldn’t be a big deal to switch to this much-much-much better solution if you could just select any category as the default.

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [October 1, 2022, 9:26pm UTC](https://meta.discourse.org/t/default-composer-category-component/148048/15 "2022-10-01T21:26:45Z")

</div>

> [@pfaffman](#):
>
> Wait. Wait! Wait!!! Why is that hidden?

Totally agree that this would be better as a setting in the UI, and that `default` is a better term

---

<div class="post-metadata">

### Author: ![mattdm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mattdm/32/216484_2.png) [@mattdm](https://meta.discourse.org/u/mattdm)
#### Post date: [October 3, 2022, 5:44pm UTC](https://meta.discourse.org/t/default-composer-category-component/148048/16 "2022-10-03T17:44:42Z")

</div>

I think `#general` makes sense for

- many smaller sites, especially those where the overall focus of discussion is narrow
- sites that haven’t put a lot of work into thinking about categories \[1\]

I won’t claim my sites are _huge_, but `#general` wouldn’t really work.

To make this all concrete, in case this helps:

Currently, we have two sites, end-user-support-focused [Ask Fedora](https://ask.fedoraproject.org/) and project-mainatainer/contributor-focused [Fedora Discussion](https://discussion.fedoraproject.org/). After running with that split for several years, we’ve decided to merge Ask into being a sub-category of Discussion.

Based on experience, we _definitely_ want the default category for new users to be Ask Fedora. Otherwise, chaos ensues. But, people who are more involved in the contributor side are likely to want the Project Discussions category (the current default on Discussion) to be that default. It’d be nice to present this as an easy option.

(Let me know if I should split this into its own topic or make a ticket somewhere…)

* * *

1. admittedly, most sites in my experience _\*sigh\*_

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 3, 2022, 6:01pm UTC](https://meta.discourse.org/t/default-composer-category-component/148048/17 "2022-10-03T18:01:39Z")

</div>

> [@mattdm](#):
>
> I won’t claim my sites are _huge_, but `#general` wouldn’t really work.

But won’t it work as well as #Uncategorized ?

---

<div class="post-metadata">

### Author: ![mattdm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mattdm/32/216484_2.png) [@mattdm](https://meta.discourse.org/u/mattdm)
#### Post date: [October 4, 2022, 3:36pm UTC](https://meta.discourse.org/t/default-composer-category-component/148048/18 "2022-10-04T15:36:26Z")

</div>

> [@pfaffman](#):
>
> But won’t it work as well as #Uncategorized ?

Unless moderators are really aggressive about sorting those after they come in, that might as well be #trashcan. Who is going to subscribe to to that category?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 4, 2022, 3:53pm UTC](https://meta.discourse.org/t/default-composer-category-component/148048/20 "2022-10-04T15:53:52Z")

</div>

> [@mattdm](#):
>
> Who is going to subscribe to to that category?

The same people who subscribed to #Uncategorized ?

But I may have missed some piece of your argument. I think that this theme component is a great idea. I also think that getting rid of #Uncategorized is a great idea (which is what I’m talking about, and I am now sensing that this is not what you are talking about).

The issue is the overhead of forcing people to select a category. I think that you and I agree that it’s not that hard (if there are few enough to choose among).

---

<div class="post-metadata">

### Author: ![mattdm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mattdm/32/216484_2.png) [@mattdm](https://meta.discourse.org/u/mattdm)
#### Post date: [October 4, 2022, 4:00pm UTC](https://meta.discourse.org/t/default-composer-category-component/148048/21 "2022-10-04T16:00:33Z")

</div>

Yes, I think we’re in basic agreement. I don’t allow allow uncategorized posts — and a defined default (whether via this component or built in) seems better in every way — at least as long as the name is configurable.

And as an extra request I’d like the option to allow users to select their own default.

---

<div class="post-metadata">

### Author: ![MikeNolan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikenolan/32/297597_2.png) [@MikeNolan](https://meta.discourse.org/u/MikeNolan)
#### Post date: [March 14, 2023, 4:43am UTC](https://meta.discourse.org/t/default-composer-category-component/148048/22 "2023-03-14T04:43:49Z")

</div>

It would be nice if you could set a different default category in composer based on the groups the member is in.

I’m hoping to run multiple independent communities as separate groups with private categories on one Discourse server and would like to keep them pretty much isolated from each other.

At present when posting they have to select a category. That’s not all that bad a thing, it just would be a little more convenient if I could suggest a default based on what group they’re in.

They’re not secret groups, most members know I run multiple discussion groups, they just choose which one they’re interested in.

Similarly, it would be helpful if new users could request a group when signing up. You can place them into a group with an invite, seems like it would be useful to allow them to choose one as well, though maybe that creates issues that would require allowing private-but-selectable and private-but-mostly-secret groups

[Next page](https://meta.discourse.org/t/default-composer-category-component/148048.md?page=2)
