Bug? discourse-category-banner theme component sometimes doesn't display the banner

Wow, I thought I was nuts until I sussed out exactly when this happens…

Here’s a category banner. This is a category that anyone (anon visitors included) can see. I get this banner if I pick the category from the category dropdown in the site navigation, and if I click on a category label/box below a topic title. Which is exactly what you would expect to happen:

But I have this other category which has some group-based security on it. Notably “anyone” cannot see this category. If I navigate to this category (by picking it from the category drop-down, or by clicking the category box/label below a topic’s title) I don’t get the banner:

If I just hit reload in my browser, then the banner appears. ¯\_(ツ)_/¯

Note that I’m logged in as an Admin. If I impersonate a normal user (a level 1 user who is in a group that gives them See for this category) the behavior is the same. Navigate to category, no banner. Hit reload, banner.

??

1 Like

I can’t reproduce this on my test site?

I’ve installed discourse-category-banners, and created a private category accessible only to a specific group (+ filled out the category ‘about’ info).

When I navigate to the private category it always shows the category banner without needing a refresh.

Is there something else that could be affecting yours? (device, browser, other theme components?)

1 Like

@craigconstantine
Same. I can confirm. Windows 10, Firefox 93

1 Like

There’s lots of stuff that could be affecting mine… but without knowing what to look for . . .

But that did make me think to inspect the actual DOM in action… when I don’t see it, the banner is present, but the SPAN is empty. Notice not twist-to-reveal for the SPAN…

Once I press reload though, now the SPAN has a child DIV etc.…

1 Like