Discourse 2.8.4 NoMethodError 未定義メソッド `min_tags_from_required_group'

こんにちは

Discourse バージョン 2.8.4 で問題が発生しています。以下のエラーが表示され始めました。ご協力ありがとうございます!

discourse 10:20:36.33 INFO  ==> ** Starting Discourse **
=============== Phusion Passenger(R) Standalone web server started ===============
PID file: /opt/bitnami/discourse/passenger.8085.pid
Log file: /opt/bitnami/discourse/log/passenger.8085.log
Environment: production
Accessible via: http://0.0.0.0:8085/

You can stop Phusion Passenger(R) Standalone by pressing Ctrl-C.
Problems? Check https://www.phusionpassenger.com/library/admin/standalone/troubleshooting/
===============================================================================
[ N 2023-10-19 10:20:39.6128 573/T5 age/Cor/SecurityUpdateChecker.h:519 ]: Security update check: no update found (next check in 24 hours)
Started HEAD "/" for 127.0.0.1 at 2023-10-19 10:20:57 +0000
Processing by ListController#latest as HTML
  Rendered exceptions/not_found.html.erb within layouts/application (Duration: 201.0ms | Allocations: 11288)
  Rendered layout layouts/application.html.erb (Duration: 890.7ms | Allocations: 131052)
  Rendered html template (Duration: 0.1ms | Allocations: 2)
Completed 403 Forbidden in 1407ms (Views: 1.5ms | ActiveRecord: 0.0ms | Allocations: 213808)
Started GET "/" for 51.210.159.157 at 2023-10-19 10:25:14 +0000
Processing by ListController#latest as HTML
Completed 500 Internal Server Error in 815ms (ActiveRecord: 0.0ms | Allocations: 77957)
NoMethodError (undefined method `min_tags_from_required_group' for #<Category:0x000055d0dea2b8b8>):
(eval):36:in `_fast_attributes'
app/models/site.rb:70:in `block in all_categories_cache'
lib/cache.rb:94:in `fetch'
app/models/site.rb:52:in `all_categories_cache'
app/models/site.rb:78:in `categories'
app/serializers/site_serializer.rb:203:in `categories'
(eval):32:in `_fast_attributes'
app/models/site.rb:167:in `json_for'
app/controllers/application_controller.rb:595:in `preload_anonymous_data'
app/controllers/application_controller.rb:407:in `preload_json'
app/controllers/application_controller.rb:387:in `block in with_resolved_locale'
app/controllers/application_controller.rb:387:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:71:in `call'
lib/middleware/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:361:in `call'
config/initializers/100-quiet_logger.rb:23:in `call'
config/initializers/100-silence_logger.rb:31:in `call'
lib/middleware/enforce_hostname.rb:23:in `call'
lib/middleware/request_tracker.rb:198:in `call'

こんにちは :slight_smile:

お使いのインストールは最新ではありません。インスタンスをアップグレードして、問題が解決するかどうかを確認してください。

「いいね!」 2

回答ありがとうございます。3.1.2にアップデートしましたが、ブラウザで受信したページが空白です。注記として、これはKubernetes上にインストールされています。ログはこちらです。

discourse 14:24:20.30 INFO  ==> ** Starting Discourse **
=============== Phusion Passenger(R) Standalone web server started ===============
PID file: /opt/bitnami/discourse/passenger.8080.pid
Log file: /opt/bitnami/discourse/log/passenger.8080.log
Environment: production
Accessible via: http://0.0.0.0:8080/

You can stop Phusion Passenger(R) Standalone by pressing Ctrl-C.
Problems? Check https://www.phusionpassenger.com/library/admin/standalone/troubleshooting/
===============================================================================
[ N 2023-10-19 14:24:23.0045 875/T5 age/Cor/SecurityUpdateChecker.h:519 ]: Security update check: no update found (next check in 24 hours)
Started HEAD "/" for 127.0.0.1 at 2023-10-19 14:24:29 +0000
Processing by ListController#latest as HTML
  Rendered exceptions/not_found.html.erb within layouts/no_ember (Duration: 182.8ms | Allocations: 94576)
  Rendered layout layouts/no_ember.html.erb (Duration: 313.7ms | Allocations: 150094)
  Rendered html template (Duration: 0.0ms | Allocations: 7)
Completed 403 Forbidden in 462ms (Views: 0.7ms | ActiveRecord: 0.0ms | Allocations: 229600)
Started GET "/" for 10.2.2.0 at 2023-10-19 14:40:12 +0000
Processing by ListController#latest as HTML
  Rendered list/list.erb within layouts/application (Duration: 14.6ms | Allocations: 12112)
  Rendered layout layouts/application.html.erb (Duration: 194.1ms | Allocations: 93857)
Completed 200 OK in 730ms (Views: 196.6ms | ActiveRecord: 0.0ms | Allocations: 288887)
Started GET "/extra-locales/overrides?v=284ac3c8dead8b93a53206ee318c7b3c" for 10.2.2.0 at 2023-10-19 14:40:13 +0000
Processing by ExtraLocalesController#show as */*
  Parameters: {"v"=>"284ac3c8dead8b93a53206ee318c7b3c", "bundle"=>"overrides"}
  Rendered text template (Duration: 0.0ms | Allocations: 1)
Completed 200 OK in 17ms (Views: 1.7ms | ActiveRecord: 0.0ms | Allocations: 2330)
[ N 2023-10-19 14:52:13.8628 875/T4 age/Cor/CoreMain.cpp:1146 ]: Checking whether to disconnect long-running connections for process 1410, application /opt/bitnami/discourse (production)
Started GET "/admin" for 10.2.2.0 at 2023-10-19 14:53:21 +0000
Processing by Admin::AdminController#index as HTML
  Rendered default/empty.html.erb within layouts/application (Duration: 0.4ms | Allocations: 177)
  Rendered layout layouts/application.html.erb (Duration: 479.1ms | Allocations: 182114)
Completed 200 OK in 934ms (Views: 481.4ms | ActiveRecord: 0.0ms | Allocations: 349246)
Started GET "/admin" for 10.2.3.0 at 2023-10-19 14:54:02 +0000
Processing by Admin::AdminController#index as HTML
  Rendered default/empty.html.erb within layouts/application (Duration: 0.0ms | Allocations: 11)
  Rendered layout layouts/application.html.erb (Duration: 11.3ms | Allocations: 4650)
Completed 200 OK in 109ms (Views: 12.1ms | ActiveRecord: 0.0ms | Allocations: 19340)
Started GET "/extra-locales/wizard?v=c155b44f23dcee8a7513016ec793d055" for 10.2.3.0 at 2023-10-19 14:54:03 +0000
Processing by ExtraLocalesController#show as */*
  Parameters: {"v"=>"c155b44f23dcee8a7513016ec793d055", "bundle"=>"wizard"}
Started GET "/extra-locales/admin?v=a43add616a42c5cead63cdd53b0dda4a" for 10.2.3.0 at 2023-10-19 14:54:03 +0000
Processing by ExtraLocalesController#show as */*
  Parameters: {"v"=>"a43add616a42c5cead63cdd53b0dda4a", "bundle"=>"admin"}
  Rendered text template (Duration: 0.0ms | Allocations: 1)
Completed 200 OK in 173ms (Views: 3.3ms | ActiveRecord: 0.0ms | Allocations: 12837)

ブラウザのコンソールに何か表示されていますか?

「いいね!」 1

原因はプラグイン discourse-local-dates のようでした。無効にしたところ、すべて正常に動作し始めました。このプラグインを再度有効にする方法を検討する必要があります。

サポートありがとうございました!

「いいね!」 2

discourse-local-dates は Discourse 2.0 以降に同梱されているコアプラグインです :thinking:

正直、少し困惑しています。何が起こったのか分かりません。kubectl を使用してアップグレードを実行しました。アップグレードでは、Postgres の古いバージョンを使用する必要がありました(デフォルトでは、最後のチャートで 16 がインストールされますが、これは discourse 3.1.2 には適していません)。エラーはありませんでしたが、真っ白なページが表示され、discourse-local-dates を移動させた後、すべてうまくいき、ブラウザコンソールにエラーは表示されなくなりました。

現時点では、解決策の手がかりがありません…

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.