רשימת משתמשים חלקית בלבד?

סיכום מבוסס בינה מלאכותית

Users reported that the user directory on Discourse was only displaying a partial list of users, failing to load additional pages via infinite scroll—especially on desktop. patrickemin first raised the issue, which was reproducible on Meta by JammyDodger and Moin. martin investigated and suspected a race condition, possibly linked to the User Card Directory theme component mentioned by JammyDodger. Moin noted inconsistent behavior tied to viewport width and time filters. A breakthrough came from cathys, who identified that the .load-more-sentinel div had zero height, preventing IntersectionObserver from triggering. Their simple CSS fix—setting height: 1px—resolved the issue for patrickemin and Moin. kelv merged the fix into Discourse core via PR #35262, ensuring all users benefit. cathys shared their GitHub for future contributions, and j.jaffeux thanked them. The bug appears fully resolved.

Hi, how come my users list is only showing a small percentage of all my users? Were are the others? Thanks.

https://mysite/u?cards=no&order=days_visited&period=all

2 לייקים

Looks like this can be repro’d here on meta with just the basic user list too https://meta.discourse.org/u

Seems to not be loading any extra pages when I hit the ‘bottom’. (iPhone/safari)

Let’s slip it over to bug for someone to have a look :eyes:

5 לייקים

תודה שעדכנת אותנו, יידעתי את הצוות ונתתי עדיפות! נטפל בזה בשבועות הקרובים.

לייק 1

I can reproduce this here on Meta, but weirdly not in my local setup. Error is here in the users controller:

It’s like it’s being called too early in some cases, will investigate.

לייק 1

Still not really reproducing locally, but this PR should help with it, I will get @kelv to review because he moved this to an observer initially:

https://github.com/discourse/discourse/pull/33122

2 לייקים

Just on the off-chance you’ve not considered it, is this connected to having the User Card Directory theme component? I think that’s a thing meta and the OP have in common that you may not have on your test site?

3 לייקים

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

3 לייקים

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

לייק 1

A post was split to a new topic: User stats incorrect in user directory

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

2 לייקים

מוזר, תודה שצללת לזה קצת מועין, אנסה תיקון נוסף, לא בטוח למה השינוי ב-LoadMore לא פתר את זה.

לייק 1

I’ve just noticed that the user list seems to be working for me now. :+1:

Has yours resolved as well @patrickemin?

אני אעדכן לפני מחר ואודיע לך, תודה.

לייק 1

היי, הרגע עדכנתי את ה-Discourse שלי, אבל לא, רק כ-40 משתמשים מופיעים ברשימת 610 המשתמשים שלי.

לייק 1

שמתי לב שגלילה אינסופית עובדת בסדר בנייד, אבל לא בגדלים של דסקטופ/Nest Hub. לאחר בדיקה, נראה של-div .load-more-sentinel יש גובה אפס, ולכן ה-IntersectionObserver מעולם לא הופעל.

תיקון פשוט מאוד שעשיתי הוא לתת לסנטינל גובה קטן (למשל, 1px).

.load-more-sentinel {
    height: 1px;
}
5 לייקים

תודה, התיקון עובד, תודה רבה!

Great that this worked for you, and thanks for your contribution :slight_smile: I merged in this fix so other users of Discourse will benefit from this too. Hopefully this fully resolves the bug!

3 לייקים

Works great for me. I was able to reproduce it very reliably on my tablet before. :partying_face:

Would you split post #11 into a new topic? Obviously, it’s unrelated because I still see some wrong numbers in the user directory when I follow the steps. Thank you

לייק 1

You’re welcome. This is my github, happy to contribute more directly in the future!

2 לייקים