My Post Badges are quite numerous and large. Is it possible for users to hide specific Post Badges they don’t want to display?
We’ve made some recent improvements to core and this theme component which should totally resolve the performance concerns. All badge data will now be loaded as part of the main topic payload.
Medals disappeared after the update
Previous effects ↓↓↓↓↓↓
Themes used↓↓↓↓↓↓
FKB Pro - Social theme - Theme - Discourse Meta
Please make sure you’re running the latest version of Discourse core. If it’s still not working after that, then I’d recommend trying to delete and re-install the theme component.
I’ve tried everything. It doesn’t work.
But the plugin version works but he can’t customize the medals displayed
Are you able to share a link to the forum showing the problem? (via PM is fine, if you prefer not to share in public)
same problem
Is it possible to let users choose which badge they want to display?
It’s not possible currently with this TC, Yt.w. I like the idea, though.
You have the plugin alternative, which allows users to select what badges to display.
It still works, but there are deprecations and other things to adjust.
I can take a look later!
Really!? Thank you so much
Sorry for the wait.
I made a PR:
If you want to test right now, you can use my fork with:
git clone --branch fix-deprecations https://github.com/arkshine/discourse-post-badges-plugin
Thank you so much!
I get some warnings in the browser development console for the latest Discourse rebuild:
[PLUGIN discourse-post-badges-plugin] Deprecation notice: Using
registerWidgetShim
is deprecated and will soon stop working. Affected widgetShim: featured-badges. [deprecated since Discourse v3.5.0.beta8-dev] [deprecation id: discourse.widgets-end-of-life] [info: Upcoming EOL for the widget rendering system]
[PLUGIN discourse-post-badges-plugin] Deprecation notice:
api.includePostAttributes
has been deprecated. Useapi.addTrackedPostProperties
instead. [deprecated since Discourse v3.5.0.beta1-dev] [deprecation id: discourse.post-stream-widget-overrides] [info: Upcoming post stream changes - How to prepare themes and plugins]
[PLUGIN discourse-post-badges-plugin] Deprecation notice: The
poster-name
widget has been deprecated andapi.decorateWidget
is no longer a supported override. [deprecated since Discourse v3.5.0.beta1-dev] [deprecation id: discourse.post-stream-widget-overrides] [info: Upcoming post stream changes - How to prepare themes and plugins]
Could you share the errors here? Thanks.
client-error-handler.js:88 [THEME 7 'Post Badges'] TypeError: Cannot read properties of undefined (reading 'forEach')
at initialize-discourse-post-badges.gjs:124:35
at y (transformer.js:222:1)
at get additionalArticleClasses (index.js:49:1)
at eM (reviewable-status.js:96:1)
at snippet.js:62:1
at snippet.js:62:1
at X (video-placeholder.js:39:1)
at T (snippet.js:62:1)
at h.get (item.js:168:1)
at Array Iterator.next (<anonymous>)
at A.getValue (item.js:168:1)
at item.js:168:1
at snippet.js:62:1
at X (video-placeholder.js:39:1)
at T (snippet.js:62:1)
at eL (message-bus.js:159:1)
at eE.flush (message-bus.js:159:1)
at Object.evaluate (message-bus.js:159:1)
at Object.evaluate (message-bus.js:159:1)
at tq.evaluateSyscall (message-bus.js:159:1)
at tq.evaluateInner (message-bus.js:159:1)
at tq.evaluateOuter (message-bus.js:159:1)
at t1.next (message-bus.js:159:1)
at t1._execute (message-bus.js:159:1)
at t1.execute (message-bus.js:159:1)
at tW.handleException (message-bus.js:159:1)
at tJ.handleException (message-bus.js:159:1)
at t$.throw (message-bus.js:159:1)
at ek.evaluate (message-bus.js:159:1)
at t$._execute (message-bus.js:159:1)
at t$.execute (message-bus.js:159:1)
at tQ.rerender (message-bus.js:159:1)
at t6.render (bookmark.js:114:1)
at bookmark.js:114:1
at tA (message-bus.js:159:1)
at ia._renderRoots (bookmark.js:114:1)
at ia._renderRootsTransaction (bookmark.js:114:1)
at ia._revalidate (bookmark.js:114:1)
at invoke (number-field.js:11:1)
at m.flush (number-field.js:11:1)
at g.flush (number-field.js:11:1)
at q._end (number-field.js:11:1)
at number-field.js:11:1
f @ client-error-handler.js:88
Thanks @md-misko, this should fix it: FIX: Correctly handle post with no badge info by davidtaylorhq · Pull Request #42 · discourse/discourse-post-badges · GitHub
Those should now be resolved (by DEV: Update for glimmer post-stream (#41) · discourse/discourse-post-badges@010b9c4 · GitHub)
Hm, no. I still see this in the development console:
[PLUGIN discourse-post-badges-plugin] Deprecation notice: Using
registerWidgetShim
is deprecated and will soon stop working. Affected widgetShim: featured-badges. [deprecated since Discourse v3.5.0.beta8-dev] [deprecation id: discourse.widgets-end-of-life] [info: Upcoming EOL for the widget rendering system]
[PLUGIN discourse-post-badges-plugin] Deprecation notice:
api.includePostAttributes
has been deprecated. Useapi.addTrackedPostProperties
instead. [deprecated since Discourse v3.5.0.beta1-dev] [deprecation id: discourse.post-stream-widget-overrides] [info: Upcoming post stream changes - How to prepare themes and plugins]
[PLUGIN discourse-post-badges-plugin] Deprecation notice: The
poster-name
widget has been deprecated andapi.decorateWidget
is no longer a supported override. [deprecated since Discourse v3.5.0.beta1-dev] [deprecation id: discourse.post-stream-widget-overrides] [info: Upcoming post stream changes - How to prepare themes and plugins]
I just upgraded/rebuilt Discourse.

[PLUGIN discourse-post-badges-plugin]
It looks like you’re using a Pavillion plugin which is based on this theme component. You’ll need to contact them about an update, or switch to this official theme-component version (which has been made now far more efficient, since Pavilion forked off the plugin version).
Yeah, that’s the case. Sorry, I did not notice that.
So you would suggest to use the theme component version as the advantages of the Pavillion plugin is not there anymore?
Are both additions compatible with eachother?