אני עדיין לא בטוח למה מחקתי תמיכה בדפי הבית המוגדרים כברירת מחדל והאנונימיים מלפני כן. החזרתי אותם.
כעת, אם קיים custom_default_homepage, הוא משתמש בו אלא אם כן יש התאמה לקבוצה תואמת. אם יש anon_page והמשתמש אנונימי, הוא משתמש בו.
לא הצלחתי להבין איך או מתי יש להגדיר את הדף הנייד (האם זה עבור משתמשים אנונימיים? כל המשתמשים? האם הוא עוקף את דף ברירת המחדל? את מפת הקבוצות?), אז מחקתי אותו. אם אתה משתמש בדף הנייד הזה, ספר לי מה אתה חושב שהוא צריך לעקוף (אני חושב שאולי כדאי להגדיר אותו כדף ברירת המחדל אם הם בנייד, אבל אם יש דף קבוצה, אז להשתמש בו? עדיין לא ברור מה לעשות עבור אנונימי מול מחובר–אני מניח שאולי צריך להיות גרסאות ניידות לכולם?).
הנה הקוד:
let url = null;
if (settings.custom_default_homepage) {
url = settings.custom_default_homepage.replace(/^\/+/g, "");
}
if (user) {
if (user.primary_group_name \u0026\u0026 settings.group_page_map) {
let groupMap = settings.group_page_map.replace(",", ":").split("|");
const mapEntry = groupMap.find((value) =
u003e
RegExp(user.primary_group_name).test(value)
);
if (mapEntry) {
url = mapEntry.split(":")[1].replace(/^\/+/g, "");
}
}
} else if (settings.anon_page) {
url = settings.anon_page.replace(/^\/+/g, "");
}
האם רכיב העיצוב הזה נועד להפנות כל אחד בקבוצה לדף הבית בכניסה או באמצעות הקישורים? התקנתי אותו, והלוגו מפנה לדף הנבחר אבל בכניסה המשתמש עדיין מופנה לדף ברירת המחדל /latest. אם זה מטפל בהפניית הכניסה הזו, בטח עדיין הגדרתי משהו לא נכון.המטרה שלי היא שכל המשתמשים ייכללו בקבוצת ברירת מחדל וכולם יופנו לדף חלופי בכניסה.
האם רמת אמון 0 נחשבת לקבוצה חוקית? האם זו ההגדרה הנכונה עבור ה-גרופ פייג’ מאפ (Group Page Map)? trust_level_0:/discourse-ai/ai-bot/conversations. זו ההגדרה הנוכחית שהגדרתי.
First, thank you everyone for jumping in and helping with this! It is greatly appreciated!
This is a head scratcher for me.
I have installed this plugin without any issues and set trust_level_0 in the settings with make this primary group. All members in site were added to the group. All users show this as the primary group now.
In the Custom Homepage for Groups component settings this is what I have set.
When accessing the page the users in the Community-Core primary group still land on /latest. If I change the Anon Page to something other than /latest when logging in the users will be shown whatever page is shown in that field so that is the redirect that is occurring.
I am using the Canvas Screen theme and changed to the default to test with the same result.
I also disabled all theme components and plugins to see if this helped without success.
I am thinking that there is either I am missing something that may be apparent to others or there may be an issue with the component.
When you right click on your site and select inspect you can see what pfaffman is asking for.
For example I see this on my user admin page (/admin/users/{user_id}/{username})
That is what I meant, but I now remember/see that the component gets the primary group from the user model, not from the CSS.
So, maybe find a user in the admin user route, and add .json to the URL. Then check what their primary group is and search (in the browser) for primary_group: true and check that the name matches exactly the case you used in the theme config.
The primary group name is indeed Community-Core, with the capital letters and hyphen, which is exactly what I have entered in the theme component’s settings.
תודה ג’יי, ניסיתי לטעון מחדש. ניסיתי התאמות רבות לכתובות האתר (URLs) וכדומה. זה בהחלט טוען את דף האנונימי. אם אני משנה את זה, זה עובר לדף הזה וגם מציג /latest בכתובת הדפדפן.
חיפשתי ומניח שאין דרך אחרת פשוטה להפנות מחדש. זה היה קל יותר עם אתרי PHP. אני עדיין מתחיל/ה עם Discourse.