# Subcategorieën verschijnen pas na vernieuwen en een paar andere problemen

**URL:** https://meta.discourse.org/t/subcategories-only-show-up-after-refresh-and-a-few-other-issues/270753
**Category:** Bug
**Tags:** category-banners
**Created:** [30 maart 2023 om 06:56 UTC](https://meta.discourse.org/t/subcategories-only-show-up-after-refresh-and-a-few-other-issues/270753 "2023-03-30T06:56:07Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![md-misko](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/md-misko/32/126315_2.png) [@md-misko](https://meta.discourse.org/u/md-misko)
#### Post date: [30 maart 2023 om 06:56 UTC](https://meta.discourse.org/t/subcategories-only-show-up-after-refresh-and-a-few-other-issues/270753/1 "2023-03-30T06:56:07Z")

</div>

Thanks for the new version, which brings better integration with [Category Icons](https://meta.discourse.org/t/category-icons/104683). There are some issues though:

1. If icon color is set in the Category Icons TC and the banner color in Category Banners is set to the same color, the icon in the banner title becomes ‘invisible’
2. New flex CSS style on the icon breaks long category names with icons on narrow viewports (mobile view)  
 ![image](https://global.discourse-cdn.com/meta/original/4X/d/7/8/d78b5844900c2393730f613e4f9fb410ca14a1f6.png)
3. Category with subcategories doesn’t show banner on landing, shows banner after refresh

First one can be easily fixed with CSS

```css
h1 span.category-icon {
  color: rgb(255, 255, 255) !important;
}

```

but it would be even better if this could be overriden directly in the TC. Maybe a new setting `set category icon color` which would be enabled when `show category icon` is checked.

Second one is trickier, I’ve tried overriding it with CSS without consistent results, perhaps this will need a redesign on the structural level (I believe the icon element was previously in a separate div, but is now included inside h1)?

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [30 maart 2023 om 17:16 UTC](https://meta.discourse.org/t/subcategories-only-show-up-after-refresh-and-a-few-other-issues/270753/2 "2023-03-30T17:16:54Z")

</div>

Great feedback, thanks! I’ve just merged an update to how the icon is aligned and added a setting that will override the category icon color when it’s enabled. This also requires an update to the category icons component (I needed to add a class name to adjust the layout), so make sure to update that as well.

---

<div class="post-metadata">

### Author: ![md-misko](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/md-misko/32/126315_2.png) [@md-misko](https://meta.discourse.org/u/md-misko)
#### Post date: [30 maart 2023 om 20:56 UTC](https://meta.discourse.org/t/subcategories-only-show-up-after-refresh-and-a-few-other-issues/270753/3 "2023-03-30T20:56:32Z")

</div>

Thanks Kris, this works perfectly now.

I’m still having issues with

> [@md-misko](#):
>
> Category with subcategories doesn’t show banner on landing, shows banner after refresh

though, any ideas?

Checked on two different browsers on Android, same result.

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [30 maart 2023 om 21:25 UTC](https://meta.discourse.org/t/subcategories-only-show-up-after-refresh-and-a-few-other-issues/270753/4 "2023-03-30T21:25:14Z")

</div>

oh I overlooked that one… this happens when directly visiting a subcategory?

---

<div class="post-metadata">

### Author: ![md-misko](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/md-misko/32/126315_2.png) [@md-misko](https://meta.discourse.org/u/md-misko)
#### Post date: [31 maart 2023 om 05:17 UTC](https://meta.discourse.org/t/subcategories-only-show-up-after-refresh-and-a-few-other-issues/270753/5 "2023-03-31T05:17:01Z")

</div>

No, this only happens when directly visiting a category which has subcategories.

Edit: this only happens when opening such category directly from /categories view. When using a category drop down to select a category the banner is displayed correctly.

Directly visiting subcategories works fine.

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [31 maart 2023 om 15:03 UTC](https://meta.discourse.org/t/subcategories-only-show-up-after-refresh-and-a-few-other-issues/270753/6 "2023-03-31T15:03:08Z")

</div>

> [@md-misko](#):
>
> this only happens when opening such category directly from /categories view. When using a category drop down to select a category the banner is displayed correctly.

Hmm, I’m not able to reproduce this…

![Kapture 2023-03-31 at 10.59.55](https://global.discourse-cdn.com/meta/original/4X/c/6/a/c6a2b1da7042957a18008eb5eb27380add5d9e14.gif)

Which `desktop category page style` are you using in your site settings? maybe I’m missing some specific situation 🤔

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [31 maart 2023 om 16:25 UTC](https://meta.discourse.org/t/subcategories-only-show-up-after-refresh-and-a-few-other-issues/270753/7 "2023-03-31T16:25:26Z")

</div>

i installed this and have reproduced the error. in a category with a subcategory, i have clicked on the header breadcrumb and when you go to the category the header box is there but not the category banner.

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [31 maart 2023 om 16:26 UTC](https://meta.discourse.org/t/subcategories-only-show-up-after-refresh-and-a-few-other-issues/270753/8 "2023-03-31T16:26:24Z")

</div>

awesome component btw. i will see if i can screengrab the missing category banner thing…

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [31 maart 2023 om 16:51 UTC](https://meta.discourse.org/t/subcategories-only-show-up-after-refresh-and-a-few-other-issues/270753/9 "2023-03-31T16:51:49Z")

</div>

ok there are two ways the banner doesn’t show up - from category page (i am running topic author component). it works for sub-categories but not categories. it also happens from the topic header breadcrumb in a topic.

---

<div class="post-metadata">

### Author: ![md-misko](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/md-misko/32/126315_2.png) [@md-misko](https://meta.discourse.org/u/md-misko)
#### Post date: [31 maart 2023 om 16:57 UTC](https://meta.discourse.org/t/subcategories-only-show-up-after-refresh-and-a-few-other-issues/270753/10 "2023-03-31T16:57:40Z")

</div>

> [@awesomerobot](#):
>
> some specific situation

I think I found the cause: in the top category settings set `Default List Filter` from `all topics` to `no subcategories` and refresh, then you’ll be able to reproduce.

@Lilly do you have the same `no subcategories` set by any chance?

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [31 maart 2023 om 17:01 UTC](https://meta.discourse.org/t/subcategories-only-show-up-after-refresh-and-a-few-other-issues/270753/11 "2023-03-31T17:01:53Z")

</div>

i have this:

 ![image](https://global.discourse-cdn.com/meta/original/4X/c/9/c/c9cfc81242a99b877ecbfa68281d59f703e889f1.jpeg)

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [31 maart 2023 om 17:02 UTC](https://meta.discourse.org/t/subcategories-only-show-up-after-refresh-and-a-few-other-issues/270753/12 "2023-03-31T17:02:49Z")

</div>

Oh yes, I can reproduce this now thanks for figuring that out. I’ll look into what’s going wrong with this.

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [10 april 2023 om 16:41 UTC](https://meta.discourse.org/t/subcategories-only-show-up-after-refresh-and-a-few-other-issues/270753/13 "2023-04-10T16:41:45Z")

</div>

@md-misko @Lilly, this was due to an inconsistency in Discourse, and this was fixed here at the end of the last week: [DEV: Change the params for categoryNone redirect by cvx · Pull Request #20944 · discourse/discourse · GitHub](https://github.com/discourse/discourse/pull/20944)

So this issue should go away the next time Discourse is updated.

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [13 april 2023 om 18:23 UTC](https://meta.discourse.org/t/subcategories-only-show-up-after-refresh-and-a-few-other-issues/270753/14 "2023-04-13T18:23:56Z")

</div>

thank you for all your ‘awesome’ work 🙂

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [6 juli 2023 om 12:40 UTC](https://meta.discourse.org/t/subcategories-only-show-up-after-refresh-and-a-few-other-issues/270753/15 "2023-07-06T12:40:25Z")

</div>


