Discourseカテゴリーヘッダーのテーマコンポーネント

それらのタグはカテゴリの説明の一部です。html-safeを適用してみることはできますが、これが脆弱性を導入する可能性があるかどうかわかりません。

@NateDhaliwal よくわかりません!申し訳ありませんが、これらのエラーが何に対応するのか、またはそのページに直接関連するものをどのように見つけるのか全くわかりません。

他のコンポーネントがどのように処理しているか確認しましたか?
セーフだと思います。少なくとも、公式のカテゴリバナーコンポーネントは、個別のエスケープなしで html-safe を使用しているという印象があります。

「いいね!」 2

ちなみに、これは新しい /admin/config/user-fields.json ではなく、古いルートを使用しようとしている問題のようです。

また、次のような言及もあります。

@RGJ さんならもっと詳しいかもしれませんね? :crossed_fingers:

「いいね!」 1

TL;DR いいえ。 :slight_smile:

長いバージョン:

これは、ホスティング(CDCKの「ホストされたサイト」に似ています)で使用している内部プラグインで、サイトをホストするために必要な追加機能がいくつか追加されています。この特定の行は、マルチサイトの「見つかりません」を、サイトの所有者がDNSを誤って設定した可能性を示唆する、より詳細なエラーメッセージに置き換えます。

マルチサイトミドルウェアをパッチするため、ホストしているすべてのサイトのすべてのリクエストがこれを通過します。スタックトレースでこのプラグインが表示され、lib/middleware/enforce_hostname.rb の行がその直上にある場合、それは通常の呼び出しであり、問題の原因ではありません。

「いいね!」 3

安定版をご利用ですか? アップデートによって安定版でプラグインが壊れたのかもしれません。その場合、互換性ファイルにエントリを追加すると役立つかもしれません。

「いいね!」 2

@Moin 分かりません、自分がどのブランチにいるか確認するにはどうすればよいですか?

「いいね!」 1

はい、@jackierenee さん、安定版ですよ。

「いいね!」 5

@RGJ 確認ありがとうございます。

ということは、このコンポーネントをサイトに戻す前に、コンパチビリティピンを待つだけで良いということでしょうか?

この問題を解決することを期待しているPRに取り組んでいます。

「いいね!」 3

はい :+1:

「いいね!」 1

はい。

テーマコンポーネントがない場合、カテゴリの説明のテキストはデフォルトで --font-up-3 になります。これは .category-heading クラスを介して行われます。最近これが大きくなったと思います。

テーマコンポーネントがある場合、カテゴリの説明のテキストは --font-0 になります。これは --font-up-1(より大きい)または font-up-2(最大)に引き上げることができます。どちらも新しい標準には達していません!

「いいね!」 1

これで大丈夫ですか?
小さい → --font-up-2
標準 → --font-up-3
大きい → --font-up-4
特大 → --font-up-5
Cc: @Rhidian

「いいね!」 1

@jackiereneeさん、PRをマージしました。更新してみて、動作するか確認してもらえますか?

「いいね!」 1

こんにちは @NateDhaliwal さん、更新を試してコンポーネントをサイトに戻しましたが、カテゴリページはまだ空白です。

そして、最小限のカテゴリボックスと組み合わせて使用しようとすると、ホームページも空白になります。

何か間違っているのかもしれませんが、解決方法がわかりません。

サイトの上部にもエラーが表示されるようになりました。

もう一つ、これがそのエラーメッセージに関連するエラーログだと思います:

Message (4472 copies reported)

[db6814] ActionController::RoutingError (No route matches [GET] "/admin/customize/user_fields.json")
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

actionpack (7.2.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:35:in `call'
actionpack (7.2.2.1) lib/action_dispatch/middleware/show_exceptions.rb:32:in `call'
logster (2.20.0) lib/logster/middleware/reporter.rb:40:in `call'
railties (7.2.2.1) lib/rails/rack/logger.rb:41: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'
plugins/z-communiteq-features/plugin.rb:142:in `call'
rack (2.2.10) lib/rack/method_override.rb:24:in `call'
rack (2.2.10) lib/rack/sendfile.rb:110: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.8) 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_multisite (6.1.0) lib/rails_multisite/middleware.rb:26:in `call'
plugins/z-communiteq-features/plugin.rb:168:in `call'
railties (7.2.2.1) lib/rails/engine.rb:535:in `call'
railties (7.2.2.1) lib/rails/railtie.rb:226:in `public_send'
railties (7.2.2.1) lib/rails/railtie.rb:226:in `method_missing'
rack (2.2.10) lib/rack/urlmap.rb:74:in `block in call'
rack (2.2.10) lib/rack/urlmap.rb:58:in `each'
rack (2.2.10) lib/rack/urlmap.rb:58:in `call'
unicorn (6.1.0) lib/unicorn/http_server.rb:634:in `process_client'
unicorn (6.1.0) lib/unicorn/http_server.rb:739:in `worker_loop'
unicorn (6.1.0) lib/unicorn/http_server.rb:547:in `spawn_missing_workers'
unicorn (6.1.0) lib/unicorn/http_server.rb:143:in `start'
unicorn (6.1.0) bin/unicorn:128:in `
vendor/bundle/ruby/3.3.0/bin/unicorn:25:in `load'
vendor/bundle/ruby/3.3.0/bin/unicorn:25:in `


Env

HTTP HOSTS: community.eaie.org

ありがとうございます!

ブラウザコンソールにエラーはありますか?
現在お使いの Discourse のバージョンを教えていただけますか?(/admin ページで確認できます。)
よろしくお願いします。

こんにちは @NateDhaliwal さん、ブラウザコンソールでのエラーが具体的に何を意味するのか分かりません。

実行しているDiscourseのバージョンはこれだと思います:Discourse 3.4.6 - GitHub - discourse/discourse: A platform for community discussion. Free, open, simple. version 3d149ba8244585f4bcb41db77aa8825e72468bdb

@NateDhaliwal さん、すみません、自分で解決できました。以下にエラーの一部を示します。

Discourse v3.4.6 — https://github.com/discourse/discourse/commits/3d149ba824 — Ember v5.12.0
category-header.gjs:51 Uncaught TypeError: Cannot read properties of undefined (reading 'mobileView')
    at get showHeader (category-header.gjs:51:61)
    at eE (index.js:78:1)
    at index.js:78:1
    at index.js:78:1
    at X (index.js:78:1)
    at T (index.js:78:1)
    at index.js:78:1
    at index.js:78:1
    at X (index.js:78:1)
    at T (index.js:78:1)
    at Object.evaluate (index.js:78:1)
    at Object.evaluate (index.js:78:1)
    at tV.evaluateSyscall (index.js:78:1)
    at tV.evaluateInner (index.js:78:1)
    at tV.evaluateOuter (index.js:78:1)
    at t1.next (index.js:78:1)
    at t1._execute (index.js:78:1)
    at t1.execute (index.js:78:1)
    at t2.sync (index.js:78:1)
    at t6.render (index.js:78:1)
    at index.js:78:1
    at tx (index.js:78:1)
    at io._renderRoots (index.js:78:1)
    at io._renderRootsTransaction (index.js:78:1)
    at io._revalidate (index.js:78:1)
    at invoke (index.js:78:1)
    at m.flush (index.js:78:1)
    at g.flush (index.js:78:1)
    at V._end (index.js:78:1)
    at V.end (index.js:78:1)
    at V._runExpiredTimers (index.js:78:1)このエラーを理解する
category-header.gjs:51 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'mobileView')
    at get showHeader (category-header.gjs:51:61)
    at eE (index.js:78:1)
    at index.js:78:1
    at index.js:78:1
    at X (index.js:78:1)
    at T (index.js:78:1)
    at index.js:78:1
    at index.js:78:1
    at X (index.js:78:1)
    at T (index.js:78:1)
    at Object.evaluate (index.js:78:1)
    at Object.evaluate (index.js:78:1)
    at tV.evaluateSyscall (index.js:78:1)
    at tV.evaluateInner (index.js:78:1)
    at tV.evaluateOuter (index.js:78:1)
    at t1.next (index.js:78:1)
    at t1._execute (index.js:78:1)
    at t1.execute (index.js:78:1)
    at t2.sync (index.js:78:1)
    at t6.render (index.js:78:1)
    at index.js:78:1
    at tx (index.js:78:1)
    at io._renderRoots (index.js:78:1)
    at io._renderRootsTransaction (index.js:78:1)
    at io._appendDefinition (index.js:78:1)
    at io.appendOutletView (index.js:78:1)
    at invoke (index.js:78:1)
    at m.flush (index.js:78:1)
    at g.flush (index.js:78:1)
    at V._end (index.js:78:1)
    at index.js:78:1このエラーを理解する
category-header.gjs:51 Uncaught TypeError: Cannot read properties of undefined (reading 'mobileView')
    at get showHeader (category-header.gjs:51:61)
    at eE (index.js:78:1)
    at index.js:78:1
    at index.js:78:1
    at X (index.js:78:1)
    at T (index.js:78:1)
    at index.js:78:1
    at index.js:78:1
    at X (index.js:78:1)
    at T (index.js:78:1)
    at Object.evaluate (index.js:78:1)
    at Object.evaluate (index.js:78:1)
    at tV.evaluateSyscall (index.js:78:1)
    at tV.evaluateInner (index.js:78:1)
    at tV.evaluateOuter (index.js:78:1)
    at t1.next (index.js:78:1)
    at t1._execute (index.js:78:1)
    at t1.execute (index.js:78:1)
    at t2.sync (index.js:78:1)
    at t6.render (index.js:78:1)
    at index.js:78:1
    at tx (index.js:78:1)
    at io._renderRoots (index.js:78:1)
    at io._renderRootsTransaction (index.js:78:1)
    at io._revalidate (index.js:78:1)
    at invoke (index.js:78:1)
    at m.flush (index.js:78:1)
    at g.flush (index.js:78:1)
    at V._end (index.js:78:1)
    at V.end (index.js:78:1)
    at V._runExpiredTimers (index.js:78:1)このエラーを理解する
category-header.gjs:51 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'mobileView')
    at get showHeader (category-header.gjs:51:61)
    at eE (index.js:78:1)
    at index.js:78:1
    at index.js:78:1
    at X (index.js:78:1)
    at T (index.js:78:1)
    at index.js:78:1
    at index.js:78:1
    at X (index.js:78:1)
    at T (index.js:78:1)
    at Object.evaluate (index.js:78:1)
    at Object.evaluate (index.js:78:1)
    at tV.evaluateSyscall (index.js:78:1)
    at tV.evaluateInner (index.js:78:1)
    at tV.evaluateOuter (index.js:78:1)
    at t1.next (index.js:78:1)
    at t1._execute (index.js:78:1)
    at t1.execute (index.js:78:1)
    at t2.sync (index.js:78:1)
    at t6.render (index.js:78:1)
    at index.js:78:1
    at tx (index.js:78:1)
    at io._renderRoots (index.js:78:1)
    at io._renderRootsTransaction (index.js:78:1)
    at io._revalidate (index.js:78:1)
    at invoke (index.js:78:1)
    at m.flush (index.js:78:1)
    at g.flush (index.js:78:1)
    at V._end (index.js:78:1)
    at index.js:78:1このエラーを理解する
「いいね!」 1

それは非常に奇妙です。this.site.mobileView は元のバージョンにあったので、このエラーが今現れるのは奇妙です :thinking: 。最新のテストをパスしたものでは再現できません。これは安定版の制限でしょうか(ただし、可能性は低いようです。コアでもこれを使用しています)。