主题过滤中的帖子无法工作

我们的论坛出现了一个问题,当用户点击“X 话题中的帖子”按钮或使用 ?username_filters=xxxxxxx 后缀时,话题会变为空白。滚动条会出现,显示匹配筛选按钮的帖子数量或话题中的总帖子数,但始终不显示任何帖子。

在 2025-05-09 之前一直运行正常,此后就一直无法工作。

提前感谢大家就这个非常奇怪的问题提供任何建议或帮助。

1 个赞

在过滤其中一个主题时,我在浏览器控制台中看到了此错误:

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/
    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/
    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/
    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/
    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/
    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/
    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

看起来像是 Post Badges? 的一个问题。

1 个赞

谢谢您的检查。我们启用了该插件,但从未真正使用过它。此后,我已禁用它进行检查,但问题仍然存在。

我正在检查其他事项以确保万无一失,但如果需要更改某些设置,我很乐意进行更多测试以提供帮助。

这是插件版本,而不是主题组件。如果禁用没有效果,您可能需要不带它进行重建。

我认为这个没有插件主题,但看起来 @Arkshine 可能会知道更多,如果我们能打扰他的话?:folded_hands:

2 个赞

这里有一个非常奇怪的现象,也许能帮上忙:

进入“Post Badges”组件,然后点击“preview”只是为了看看它的行为,它工作得非常正常:显示所有帖子,滚动条也有正确的帖子计数!

为了澄清一下,您使用的是主题组件版本还是插件版本?(前者可以在您的组件部分找到,后者可以在您的插件页面找到)。

如果查看您网站的 YourSite/logs 页面中的一些错误,那里可能还有更多详细信息。

2 个赞

这是主题组件版本——很抱歉造成任何混淆。

我已检查日志,自昨天以来没有报告任何错误,因此可以假设它在那里没有被特别标记为错误。

1 个赞

我现在可以正常工作了。 :tada: 您能否尝试刷新页面并重试?(在禁用该组件的情况下)

1 个赞

我也试过了,对我来说也有效!也许在我禁用组件时出现了一些延迟,但不管是什么原因,它奏效了!

非常感谢你的帮助 :smiley:

1 个赞

我做了一个快速的 PR 来修复这个问题:

5 个赞