Having an issue with our forum where when a user clicks on the “X post in topic” button or using the ?username_filters=xxxxxxx suffix, the topic goes blank. The scroll bar appears, either with the number of posts matching the filter button or the total posts in the topic, but always without showing any of the posts.
Worked fine up until 2025-05-09 and since then not worked at all.
Thanks all in advance for any advice or help with this very strange one.
1 Like
I can see this error in the browser console when filtering one of the topics:
Uncaught (in promise) TypeError: i is undefined
initialize initialize-discourse-post-badges.js:89
b formatter.js:395
b formatter.js:395
draw formatter.js:395
render formatter.js:395
o bookmark.js:114
exports bookmark.js:114
e category-tag.js:28
e category-tag.js:28
e category-tag.js:28
exports group.js:15
exports group.js:15
e upload.js:65
l upload.js:65
exports group.js:15
e upload.js:65
l upload.js:65
e upload.js:65
rerenderWidget mount-widget.js:43
invoke client-error-handler.js:88
flush client-error-handler.js:88
flush client-error-handler.js:88
_end client-error-handler.js:88
_boundAutorunEnd client-error-handler.js:88
promise callback*35311/r/< client-error-handler.js:88
flush bookmark.js:114
_scheduleAutorun client-error-handler.js:88
_end client-error-handler.js:88
_boundAutorunEnd client-error-handler.js:88
promise callback*35311/r/< client-error-handler.js:88
flush bookmark.js:114
_scheduleAutorun client-error-handler.js:88
_end client-error-handler.js:88
_boundAutorunEnd client-error-handler.js:88
promise callback*35311/r/< client-error-handler.js:88
flush bookmark.js:114
_scheduleAutorun client-error-handler.js:88
_end client-error-handler.js:88
_boundAutorunEnd client-error-handler.js:88
promise callback*35311/r/< client-error-handler.js:88
flush bookmark.js:114
_scheduleAutorun client-error-handler.js:88
_end client-error-handler.js:88
_boundAutorunEnd client-error-handler.js:88
promise callback*35311/r/< client-error-handler.js:88
flush bookmark.js:114
_scheduleAutorun client-error-handler.js:88
_ensureInstance client-error-handler.js:88
schedule client-error-handler.js:88
30408 hashtag-autocomplete.js:158
_ named-references.js:49
m named-references.js:49
g named-references.js:49
n named-references.js:49
promise callback*95743/m/</n< named-references.js:49
m named-references.js:49
invoke client-error-handler.js:88
flush client-error-handler.js:88
flush client-error-handler.js:88
_end client-error-handler.js:88
end client-error-handler.js:88
_run client-error-handler.js:88
run client-error-handler.js:88
d bookmark.js:114
initialize-discourse-post-badges.js:89:14
Looks like an issue with Post Badges ?
1 Like
Thanks for checking. We had the plugin enabled but never actually used them. I have since disabled it to check and still having the same problem.
I’m checking other things to be sure, but if some settings need changing am happy to do a bit more testing if it helps.
Ah, it’s the plugin version rather than the theme component. There’s a chance you may need to rebuild without it if disabling doesn’t have any effect.
I don’t think there’s a plugin topic for this one, but it looks like @Arkshine may know more, if we can impose?
2 Likes
Very strange one here, which may help:
Going to the Post Badges component, then clicking on preview just to see how it is behaving and it works perfectly normally: shows all the posts and scroll bar has the correct count of posts as well!
Just to clarify, are you using the theme component version or the plugin version? (the first would be found in your components section, the second on your plugins page).
There may also be more detail on your YourSite/logs
page as well if you look for some errors in there.
1 Like
It’s the theme component version - sorry for any confusion caused there.
I’ve checked the logs and no errors reported there since yesterday so can assume it’s not flagging as one specifically there.
1 Like
I works for me fine now. Could you try refreshing the page and trying again? (With the component disabled)
1 Like
Tried and working for me as well! Maybe a delay when I disabled the component, but whatever it was it worked!
Thanks so much for the help
1 Like
I made a quick PR to fix the issue:
main
← Arkshine:fix-with-filtered-posts
opened 08:09PM - 13 May 25 UTC
meta: https://meta.discourse.org/t/posts-in-topic-filter-not-working/365968
W… hen you filter your messages in a topic, it results in a blank page, and with the following error in the console:

This PR ensures `post` model exists before checking for user badges.
4 Likes