由于监控词问题,无法打开评论标签

大家好:wave:

今天早些时候,我们的团队在打开“审核”页面时开始遇到以下错误,这使得我们无法审核任何传入的帖子和评论。我们尝试了清除缓存、退出并重新登录、使用隐身模式以及不同的设备/浏览器,但都没有奏效。

最近有人遇到过类似的问题,并能提供解决方案吗?非常感谢您的帮助 :folded_hands:

/logs 中看到了什么?那里应该有一个相应的条目。

嘿,这是最新的:

Message (52 copies reported)

NoMethodError (undefined method `post' for an instance of ReviewableQueuedPost)
app/serializers/reviewable_score_serializer.rb:81:in `watched_word_reason'
app/serializers/reviewable_score_serializer.rb:47:in `reason'
app/serializers/reviewable_score_serializer.rb:59:in `include_reason?'
lib/freedom_patches/ams_include_without_root.rb:54:in `include!'
app/controllers/reviewables_controller.rb:67:in `block in index'
app/controllers/reviewables_controller.rb:62:in `map!'
app/controllers/reviewables_controller.rb:62:in `index'
app/controllers/reviewables_controller.rb:334:in `block (3 levels) in with_deleted_content'
app/controllers/reviewables_controller.rb:334:in `block (2 levels) in with_deleted_content'
app/controllers/reviewables_controller.rb:334:in `block in with_deleted_content'
app/controllers/reviewables_controller.rb:334:in `with_deleted_content'
app/controllers/application_controller.rb:427:in `block in with_resolved_locale'
app/controllers/application_controller.rb:427:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:35:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:409:in `call'
lib/middleware/csp_script_nonce_injector.rb:12:in `call'
config/initializers/008-rack-cors.rb:26:in `call'
lib/middleware/default_headers.rb:10:in `call'
config/initializers/100-quiet_logger.rb:20:in `call'
config/initializers/100-silence_logger.rb:29:in `call'
lib/middleware/enforce_hostname.rb:24:in `call'
lib/middleware/processing_request.rb:12:in `call'
lib/middleware/request_tracker.rb:385:in `call'

Backtrace

activemodel (7.2.2.1) lib/active_model/attribute_methods.rb:512:in `method_missing'
activerecord (7.2.2.1) lib/active_record/attribute_methods.rb:491:in `method_missing'
app/serializers/reviewable_score_serializer.rb:81:in `watched_word_reason'
app/serializers/reviewable_score_serializer.rb:47:in `reason'
app/serializers/reviewable_score_serializer.rb:59:in `include_reason?'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:375:in `include?'
(eval at active_model_serializers-0.8.4/lib/active_model/serializer.rb:467):6:in `_fast_attributes'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:468:in `rescue in attributes'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:455:in `attributes'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:480:in `_serializable_hash'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:359:in `serializable_hash'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:448:in `block in merge_association'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:445:in `each'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:445:in `merge_association'
lib/freedom_patches/ams_include_without_root.rb:54:in `include!'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:368:in `block in include_associations!'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:367:in `each_key'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:367:in `include_associations!'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:362:in `serializable_hash'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:347:in `as_json'
app/controllers/reviewables_controller.rb:67:in `block in index'
app/controllers/reviewables_controller.rb:62:in `map!'
app/controllers/reviewables_controller.rb:62:in `index'
actionpack (7.2.2.1) lib/action_controller/metal/basic_implicit_render.rb:8:in `send_action'
actionpack (7.2.2.1) lib/abstract_controller/base.rb:226:in `process_action'
actionpack (7.2.2.1) lib/action_controller/metal/rendering.rb:193:in `process_action'
actionpack (7.2.2.1) lib/abstract_controller/callbacks.rb:261:in `block in process_action'
activesupport (7.2.2.1) lib/active_support/callbacks.rb:121:in `block in run_callbacks'
app/controllers/reviewables_controller.rb:334:in `block (3 levels) in with_deleted_content'
activerecord (7.2.2.1) lib/active_record/relation.rb:1355:in `_scoping'
activerecord (7.2.2.1) lib/active_record/relation.rb:541:in `scoping'
activerecord (7.2.2.1) lib/active_record/scoping/default.rb:51:in `unscoped'
app/controllers/reviewables_controller.rb:334:in `block (2 levels) in with_deleted_content'
activerecord (7.2.2.1) lib/active_record/relation.rb:1355:in `_scoping'
activerecord (7.2.2.1) lib/active_record/relation.rb:541:in `scoping'
activerecord (7.2.2.1) lib/active_record/scoping/default.rb:51:in `unscoped'
app/controllers/reviewables_controller.rb:334:in `block in with_deleted_content'
activerecord (7.2.2.1) lib/active_record/relation.rb:1355:in `_scoping'
activerecord (7.2.2.1) lib/active_record/relation.rb:541:in `scoping'
activerecord (7.2.2.1) lib/active_record/scoping/default.rb:51:in `unscoped'
app/controllers/reviewables_controller.rb:334:in `with_deleted_content'
activesupport (7.2.2.1) lib/active_support/callbacks.rb:130:in `block in run_callbacks'
app/controllers/application_controller.rb:427:in `block in with_resolved_locale'
i18n (1.14.7) lib/i18n.rb:353:in `with_locale'
app/controllers/application_controller.rb:427:in `with_resolved_locale'
activesupport (7.2.2.1) lib/active_support/callbacks.rb:130:in `block in run_callbacks'
activesupport (7.2.2.1) lib/active_support/callbacks.rb:141:in `run_callbacks'
actionpack (7.2.2.1) lib/abstract_controller/callbacks.rb:260:in `process_action'
actionpack (7.2.2.1) lib/action_controller/metal/rescue.rb:27:in `process_action'
actionpack (7.2.2.1) lib/action_controller/metal/instrumentation.rb:77:in `block in process_action'
activesupport (7.2.2.1) lib/active_support/notifications.rb:210:in `block in instrument'
activesupport (7.2.2.1) lib/active_support/notifications/instrumenter.rb:58:in `instrument'
activesupport (7.2.2.1) lib/active_support/notifications.rb:210:in `instrument'
actionpack (7.2.2.1) lib/action_controller/metal/instrumentation.rb:76:in `process_action'
actionpack (7.2.2.1) lib/action_controller/metal/params_wrapper.rb:259:in `process_action'
activerecord (7.2.2.1) lib/active_record/railties/controller_runtime.rb:39:in `process_action'
actionpack (7.2.2.1) lib/abstract_controller/base.rb:163:in `process'
actionview (7.2.2.1) lib/action_view/rendering.rb:40:in `process'
rack-mini-profiler (3.3.1) lib/mini_profiler/profiling_methods.rb:89:in `block in profile_method'
actionpack (7.2.2.1) lib/action_controller/metal.rb:252:in `dispatch'
actionpack (7.2.2.1) lib/action_controller/metal.rb:335:in `dispatch'
actionpack (7.2.2.1) lib/action_dispatch/routing/route_set.rb:67:in `dispatch'
actionpack (7.2.2.1) lib/action_dispatch/routing/route_set.rb:50:in `serve'
actionpack (7.2.2.1) lib/action_dispatch/journey/router.rb:53:in `block in serve'
actionpack (7.2.2.1) lib/action_dispatch/journey/router.rb:133:in `block in find_routes'
actionpack (7.2.2.1) lib/action_dispatch/journey/router.rb:126:in `each'
actionpack (7.2.2.1) lib/action_dispatch/journey/router.rb:126:in `find_routes'
actionpack (7.2.2.1) lib/action_dispatch/journey/router.rb:34:in `serve'
actionpack (7.2.2.1) lib/action_dispatch/routing/route_set.rb:896:in `call'
lib/middleware/omniauth_bypass_middleware.rb:35:in `call'
rack (2.2.11) lib/rack/tempfile_reaper.rb:15:in `call'
rack (2.2.11) lib/rack/conditional_get.rb:27:in `call'
rack (2.2.11) lib/rack/head.rb:12:in `call'
actionpack (7.2.2.1) lib/action_dispatch/http/permissions_policy.rb:38:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:409:in `call'
lib/middleware/csp_script_nonce_injector.rb:12:in `call'
config/initializers/008-rack-cors.rb:26:in `call'
rack (2.2.11) lib/rack/session/abstract/id.rb:266:in `context'
rack (2.2.11) lib/rack/session/abstract/id.rb:260:in `call'
actionpack (7.2.2.1) lib/action_dispatch/middleware/cookies.rb:704:in `call'
actionpack (7.2.2.1) lib/action_dispatch/middleware/callbacks.rb:31:in `block in call'
activesupport (7.2.2.1) lib/active_support/callbacks.rb:101:in `run_callbacks'
actionpack (7.2.2.1) lib/action_dispatch/middleware/callbacks.rb:30:in `call'
actionpack (7.2.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:31:in `call'
actionpack (7.2.2.1) lib/action_dispatch/middleware/show_exceptions.rb:32:in `call'
logster (2.20.1) lib/logster/middleware/reporter.rb:40:in `call'
lib/middleware/default_headers.rb:10:in `call'
lograge (0.14.0) lib/lograge/rails_ext/rack/logger.rb:18:in `call_app'
railties (7.2.2.1) lib/rails/rack/logger.rb:29:in `call'
config/initializers/100-quiet_logger.rb:20:in `call'
config/initializers/100-silence_logger.rb:29:in `call'
actionpack (7.2.2.1) lib/action_dispatch/middleware/request_id.rb:33:in `call'
lib/middleware/enforce_hostname.rb:24:in `call'
rack (2.2.11) lib/rack/method_override.rb:24:in `call'
rack (2.2.11) lib/rack/sendfile.rb:110:in `call'
plugins/discourse-prometheus/lib/middleware/metrics.rb:14:in `call'
rack-mini-profiler (3.3.1) lib/mini_profiler.rb:191:in `call'
lib/middleware/processing_request.rb:12:in `call'
message_bus (4.3.9) lib/message_bus/rack/middleware.rb:60:in `call'
lib/middleware/request_tracker.rb:385:in `call'
actionpack (7.2.2.1) lib/action_dispatch/middleware/remote_ip.rb:96:in `call'
rails_failover (2.2.0) lib/rails_failover/active_record/middleware.rb:67:in `block in call'
activerecord (7.2.2.1) lib/active_record/connection_handling.rb:376:in `with_role_and_shard'
activerecord (7.2.2.1) lib/active_record/connection_handling.rb:147:in `connected_to'
rails_failover (2.2.0) lib/rails_failover/active_record/middleware.rb:64:in `call'
rails_multisite (6.1.0) lib/rails_multisite/middleware.rb:26:in `call'
railties (7.2.2.1) lib/rails/engine.rb

有插件吗?您的 Discourse 在哪个提交版本上?

我们目前运行 16 个插件,没有新插件,也没有近期更改。Review 选项卡在早上还能正常工作,但随机停止了工作。

不确定这是否是您想要的:“Discourse 3.5.0.beta2-dev - version 9abeff460ca18d22ec9c5124a4c995af56a1de14

1 个赞

所以你的实例是在 8 小时前更新的(这可能值得一提)。

更有趣的是这个提交是

FEATURE: Display the Watched Words that caused a post to be flagged.

看看你的回溯信息

NoMethodError (undefined method `post' for an instance of ReviewableQueuedPost)
app/serializers/reviewable_score_serializer.rb:81:in `watched_word_reason'

鉴于你的错误发生在本次提交添加的这一行,我将把它移至 Bug

@pento

4 个赞

感谢您的报告@chekzz。我已经确认了该错误,我们将尽快修复。\n\n—\n\n与此错误无关,您的网站上有一个横幅报告了与您的自定义主题不兼容的问题。我们建议您按照以下主题进行必要的更改:Upcoming topic-list changes - how to prepare themes and plugins

3 个赞

感谢您的 bug 报告,@chekzz,以及您在我们修复此问题期间的耐心等待。

我已将修复程序部署到您的网站,现在一切似乎都已正常运行。如果您遇到任何其他问题,请告知我们!

2 个赞

感谢大家,@pento @dax @pento,帮忙解决得如此迅速。

我已检查,所有在我这边正常。我会了解其他团队成员的情况,并在有其他情况时更新我的评论。祝大家本周愉快!

1 个赞

此主题已在 2 天后自动关闭。不再允许回复。