קושי בהבנת הגדרת הפעלת באנר קבלת הפנים

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

זה מוזר ביותר… אצלי זה לא חוזר על עצמו. בטעות לא נשאר לך רכיב ישן מותקן?

לייק 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 יש לך רעיונות מה יכול לגרום לזה?

זהו אתר המארח את Discourse

I was able to reproduce on Foundation, without any components

לייק 1

יש לי את הרושם שאני כנראה רואה את מה שמתאים לתצורה בזמן העדכון. הפעלתי את הבאנר לפני 20 שעות, והייתה עדכון לפני 16 שעות. אז היו לי בעיות להיפטר מהבאנר. בשלב מסוים, עם זאת, זה השתפר (הייתה עוד עדכון לפני 8 שעות). עכשיו אני בקושי מצליח לגרום לבאנר להופיע. אז גם אם ההגדרה מופעלת, היא לעיתים קרובות לא מוצגת.

בנוסף, הפעלה וכיבוי מהירים (או להיפך) נראה שגורמים לבעיות.

המפתח שלנו אישר שיש משהו לא בסדר עם זה; הוא בודק את זה. תחזיקו מעמד.

לייק 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.

אני חושב ששברתי את זה שוב. לא בטוח מתי זה יתקן את עצמו

ב-Foundation זה מופעל אך לא נראה ובנושא ברירת המחדל זה מושבת אך נראה

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 לייקים

תודה מוין… זה מאוד לא צפוי, ולמיטב ידיעתי אתה האדם היחיד שנתקל בזה עד כה. אני אצור אתר בדיקה לעצמי ואבצע שינויים + פריסה כדי לראות אם אני יכול לשחזר את הבעיה, אולי זה יעזור לאתר אותה.

זה בהחלט מרגיש כמו בעיית מטמון כלשהי, במיוחד כפי שאתה אומר שהממשק עצמו מתהפך, אבל אתה יכול לראות במנהל שההגדרה עדיין מופעלת.

לייק 1

נראה שהשינוי הראשון בפרט לא עובד כראוי.
אתמול הפעלתי את הבאנר ב-Foundation וכ-25 דקות לאחר מכן הבאנר היה גלוי. זה בערך 30 הדקות שהזכרת.
עכשיו ניסיתי שוב. כיביתי אותו ב-Foundation, הוא נעלם, אבל הופיע מחדש לאחר רענון. וזה לא רק המשתמש שלי שהיא הבעיה; אני תמיד בודק עם משתמש בדיקה בלשונית פרטית. אבל גם אחרי 30 דקות הוא עדיין שם.

עדכון: עכשיו זה נעלם. אז זה לקח בערך שעה.

לייק 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

עד כה עדיין לא הצלחתי לשחזר זאת באתר שלי, גם דרך פריסות. זה אחד קשה!

אני לא יודע אם זה רלוונטי, אבל כיביתי את “אפשר באנר קבלת פנים” כשיצאו הגדרות האתר הניתנות להתאמה אישית. לכן הערך היה שונה מהגדרת ברירת המחדל. אולי זו ההבדל? אם תיצור פורום עכשיו, לערך לא תהיה היסטוריה, הוא יהיה פשוט ברירת המחדל.