ウェルカムバナーを有効にする設定の理解が難しい

Can someone help me understand this? It feels like I’m missing something very obvious because I expect the setting to work the other way around.

The description says

Display a banner on your main topic list pages to welcome members and allow them to search site content

That’s why I expected:

Checkbox checked → welcome banner
Checkbox unchecked → no banner

But the opposite happens:

「いいね!」 1

That’s exceedingly odd… Doesn’t repro for me. You don’t have the old component installed anymore by accident?

「いいね!」 1

I don’t think so

By the way: in one of ~5 times, toggling the setting works as expected, but usually it does not.

「いいね!」 2

@yuriy You got any ideas what could cause this?

It’s a site hosted by Discourse, so someone could try it themselves.

I was able to reproduce on Foundation, without any components

「いいね!」 1

I have the impression that I am most likely seeing what corresponds to the configuration at the time of the update. I activated the banner 20 hours ago, and there was an update 16 hours ago. Then I had problems getting rid of the banner. At some point, however, it got better (there was another update 8 hours ago). Now I can hardly get the banner to appear. So even if the setting is activated, it is often not displayed.

In addition, enabling and quickly disabling (or the other way around) seems to cause problems.

Our dev has confirmed there’s something up with it; he’s looking into it. Hold fast.

「いいね!」 1

It’s odd that this is persisting even after refreshing in the app :thinking: When we save these values on the server we send a MessageBus message to the client here which should update the reactive UI:

But it feels like somehow your settings have gotten true/false flipped here? What do you see if you do this in the rails console for your site?

SiteSetting.theme_site_settings

You will see something like this, the numbers represent the theme ID:

{1=>{:enable_welcome_banner=>false, :search_experience=>"search_icon"},
 -1=>{:enable_welcome_banner=>false, :search_experience=>"search_icon"},
 -2=>{:enable_welcome_banner=>false, :search_experience=>"search_field"}}

Try toggling it and seeing what values appear (you will need to close/reopen the rails console each time you change the value).

Then can you try this:

SiteSetting.theme_site_settings_json(THEME_ID)

Replacing the THEME_ID with the one that is having issues.

Edit: Ah didn’t realise this was on a hosted site, I can look :eyes:

「いいね!」 2

Seems like it’s behaving correctly on your theme on your hosted site ATM. This is interesting though:

Maybe we just keep an eye out and see if it keeps happening? Also feel free to start a PM with me if you’d like to discuss the hosted site specifics further.

I think I broke it again. Not sure when it will fix itself

On Foundation it’s enabled but not visible and on the default theme it’s disabled but visible

I just now logged in to your site and I do not see it on the Default theme, and I see it’s disabled on /admin/customize/themes/1 . I toggled it on then off and it showed then hid in the other tab.

I do not see it on Foundation too, but it is enabled in admin. Hold tight, will see if I can see the issue.

Interesting. I was able to see it also when I logged in as a test user. Maybe it had fixed itself.

Okay I refreshed it just fixed itself here too without me doing anything :thinking:

We do cache the theme site settings for each individual theme here with a 30 minute cache:

However this is supposed to clear anytime you change any theme’s site settings:

So maybe there is a certain edge case where this is not happening?

「いいね!」 1

I reenabled the banner on the default theme three hours ago to see what would happen after the next update. And it was there, but now it’s gone again. The setting is still enabled.

It still feels like it prefers the status it had when the site was updated

Edit: Now the banner is back

Edit2: It’s gone

Edit3: It’s back

Edit4: gone

Edit5: back

「いいね!」 3

Thanks Moin…this is very unexpected, and AFAIK you are the only person that has encountered this so far. I will make a test site for myself and make changes + deploy to see if I can replicate the issue, maybe that will help track it down.

It definitely feels like some caching issue, especially as you say the UI itself is flip/flopping, but you can see in admin that the setting is still enabled.

「いいね!」 1

It seems that the first change in particular isn’t working properly.
Yesterday I enabled the banner on Foundation and about 25 minutes later the banner was visible. That’s about the 30 minutes you mentioned.
Now I tried again. I disabled it on Foundation, it disappeared, but reappeared after a reload. And it’s not just my user that’s the problem; I always test with a test user in a private tab. But even after 30 minutes it’s still there.

UPDATE: Now it’s gone. So it took about an hour

「いいね!」 1

Well I’m not sure if it’s because 30m has passed since you posted this:

image

Or because I somehow altered state by doing this in your site’s console:

SiteSetting.theme_site_settings_json(-1)
=> "{\"enable_welcome_banner\":false,\"search_experience\":\"search_field\"}"

But yeah I saw that it was visible, ran that in the console, and then it was gone :sweat_smile: So definitely feels like this is a caching thing…

「いいね!」 1

So far I’m still unable to reproduce on my own hosted site, even through deployments. This is a tricky one!

I don’t know if it’s relevant, but I had disabled enable welcome banner when the themeable site settings came out. So the value was different from the default setting. Maybe that’s the difference? If you create a forum now, the value won’t have a history, it will just be the default.