Dismissed banner not showing up again after being updated

Continuing the discussion from New "Banner Topic" pin type:

we use the same topic in the moderators lounge as banner, updating it as needed when a new banner needs to be displayed. weirdly I am noticing that the new banner does not show up for me on my computer, even in incognito mode and in other web browsers, while my colleagues do see it on their computers. Is it doing something with IP address that is keeping it dismissed for me?

2 Likes

You would need to unbanner and rebanner not just edit the banner post text.

2 Likes

yeah that is what I assumed I had to do but it absolutely does not work. Other users see it but I don’t. Not sure how to troubleshoot this further. I’ve tried various variations… changing the topic content then unpinning then pinning again, then unpinning and pinning again. I know I X’ed out of the last banner we had a few weeks ago. Anyway seems not urgent because it seems to only affect me but it’s a bit disconcerting.

The user_profiles table has a dismissed_banner_key field. Might it be that isn’t getting reset? Untested, and if it does for you, it might also do for others (which they may not appreciate) . but maybe if you Banner a different topic, dismiss it, unBanner it, the reBanner the one you want it will reset?

2 Likes

Thanks for the help, here @Mittineague.

OK, I created a test user and have been able to replicate that this happens:

  1. there is a banner topic. when new user logs into discourse for first time it appears as a banner.
  2. user x’s out of the banner to dismiss it and it goes away.
  3. admin unbanners the topic, edits it to change the text slightly, then banners it again.
  4. the banner does not appear again for the new user.

But then:

  1. admin unbanners topic
  2. creates new topic and banners it
  3. banner appears again for the new user!

So there appears to be a bug with this functionality. Until/if it gets fixed, our workflow will be to create a new banner topic every time we want to change the banner.

… and here I went my whole long life not knowing that “bannering” was a thing.

4 Likes

@eviltrout can you take a look at this repro, above?

2 Likes

Thanks for reporting it! Now when a banner is published it clears out the records of banners that users have previously dismissed:

https://github.com/discourse/discourse/commit/b251d11518c5ba26e615eeebd9c82d396f0bc60a

5 Likes