תווי זכויות ממומנות משבשות את דף הפרופיל של המשתמש

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

User Roi reported that the user profile page breaks after the “Featured Badges” section, with no Save button or content below — only the footer — and shared a JavaScript error from the console. The issue occurs when a user has no featured badges set. Moin suggested checking safe mode and noted the section is likely added by the Post Badges plugin, possibly indicating a plugin bug. Arkshine, the plugin maintainer, confirmed the bug and submitted a fix via PR #4, which was later merged and resolved the issue Roi. Roi also asked whether to use the plugin or theme component (TC) version; Arkshine explained the plugin allows users to choose their own badges, while the TC version restricts badge selection to admin-defined rules Arkshine. Roi confirmed the plugin version is more suitable for their needs Roi, and Arkshine clarified both versions have valid use cases depending on requirements Arkshine. tobiaseigen requested a link to a Meta topic for the TC version, but Arkshine clarified it’s a plugin and pointed to an older Meta thread where it was discussed Arkshine.

שלום,

שמתי לב שבדף הפרופיל שימוש מסתיים אחרי הכותרת “תגי מובלטים”. כלום נוסף מתחת (בעיקר לא עוד כפתור השמירה), חוץ מרגל האתר.

מצאתי את הדברים הבאים בקונסול המפתח:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'split')
    at l.אנונימי (user-featured-badges.js:12:1)
    at getter (index.js:444:104)
    at l.a [as featuredBadges] (cache-BESCGvbE.js:1878:17)
    at eM (cache-BESCGvbE.js:1647:18)
    at index.js:95:32
    at index.js:75:37
    at Z (index.js:418:5)
    at T (index.js:74:16)
    at eU (index-Cx6axmzR.js:1786:17)
    at eK.create (index-Cx6axmzR.js:1961:17)
    at Object.evaluate (index.js:1393:23)
    at Object.evaluate (index.js:770:198)
    at tq.evaluateSyscall (index.js:3353:20)
    at tq.evaluateInner (index.js:3332:60)
    at tq.evaluateOuter (index.js:3329:10)
    at t1.next (index.js:3990:46)
    at t1._execute (index.js:3979:21)
    at t1.execute (index.js:3955:41)
    at tW.handleException (index.js:3447:19)
    at tJ.handleException (index.js:3595:52)
    at t$.throw (index.js:3400:16)
    at ek.evaluate (index.js:964:42)
    at t$._execute (index.js:3387:34)
    at t$.execute (index.js:3379:17)
    at tQ.rerender (index.js:3613:8)
    at t5.render (index-Cx6axmzR.js:5114:55)
    at index-Cx6axmzR.js:5390:16
    at tD (index.js:2893:7)
    at io._renderRoots (index-Cx6axmzR.js:5370:7)
    at io._renderRootsTransaction (index-Cx6axmzR.js:5418:12)
    at io._revalidate (index-Cx6axmzR.js:5451:10)
    at invoke (index.js:262:14)
    at m.flush (index.js:180:11)
    at g.flush (index.js:334:19)
    at q._end (index.js:762:32)
    at index.js:499:12
2 לייקים

Any idea about this problem? What information can I provide for better looking into this problem?

לייק 1

…just found out that for another user who has set some featured badges, the profile page loads completely. I did not set any featured badge - maybe that is the reason?

לייק 1

האם ניסית מצב בטוח?

אני מאמין שהקטע הזה נוסף על ידי תוסף התגים לפוסט, ולכן ייתכן שמדובר בבאג בתוסף rather מאשר בליבה של Discourse.

אולי @Arkshine יודע יותר על זה

2 לייקים

תודה על הדיווח, @Roi, ותודה ל-@Moin שהעיר את תשומת ליבי לעניין. אני יכול לשחזר את הבעיה. הבעיה מתרחשת כאשר משתמש אין לו תעודות. אגיש בקשת שיפור בהקדם האפשרי.

3 לייקים

Thank you! :slight_smile:

Btw, I run this as a plugin. Is that correct or should I run it as theme component?

לייק 1

Here we go:

https://github.com/paviliondev/discourse-post-badges-plugin/pull/4

The TC version doesn’t allow users to select the badges in their profiles. It’s a global setting for all users, which is the main difference.

4 לייקים

So I understand the plugin version is better?

Thank you for the PR! :slight_smile: Is that for both versions?

It depends on whether you want to let your users control what badges they want to show (plugin) or to have admins control what badges are allowed to be displayed based on the current user’s badges (TC).

It’s a limitation in TC that you can’t do the same as the plugin, but I think both ways have their usage depending on your needs.

2 לייקים

The PR is merged now and it is working again, thank you again! :slight_smile:

לייק 1

Note: bug tracking for third party themes/components or plugins should all be done in the dedicated plugin/theme/component topic or on a 3rd party bug tracker.

3 לייקים

@Arkshine אתה יכול לשתף את הקישור לנושא על מטה עבור רכיב הנושא שנפגע? אני אעביר את כל זה לשם ואנקה את הפוסטים המנהליים האלה.

It’s a plugin, and to my knowledge, there is no topic. Angus originally posted it in the official TC topic: Post Badges - #121 by angus. :thinking:

2 לייקים