Difficulty understanding the enable welcome banner setting

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 Like

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

1 Like

I don’t think so

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

1 Like

@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 Like

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 Like

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 Likes

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 Like

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

2 Likes