Bug?discourse-category-banner主题组件有时不显示横幅

哇,我以为我疯了,直到我弄清楚到底什么时候会发生这种情况……

这是一个类别横幅。这是一个任何人(包括匿名访客)都可以看到的类别。如果我从站点导航中的类别下拉菜单中选择该类别,以及当我点击主题标题下方的类别标签/框时,我就会看到这个横幅。这正是你所期望的:

但是,我有另一个类别,它有一些基于组的安全设置。特别是“任何人”都看不到这个类别。如果我导航到_这个_类别(通过从类别下拉菜单中选择它,或者通过点击主题标题下方的类别框/标签),我就看不到横幅:

如果我只是在浏览器中点击重新加载,横幅就会出现。 ¯\\_(ツ)_/¯

请注意,我已作为管理员登录。如果我冒充普通用户(一个属于允许他们查看此类别的组的 1 级用户),行为是相同的。导航到类别,没有横幅。点击重新加载,出现横幅。

??

1 个赞

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 个赞

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

1 个赞

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 个赞