トピック一覧プレビュー(レガシー)

こんにちは、素晴らしいプラグインをありがとうございます!

残念ながら、最後のアップデート以降、Discourse 上に直接ホストされていない画像が、グリッドやタイル表示で表示されなくなりました。ご確認いただけますでしょうか?

例えば、投稿に他のサーバー(Blogger、Picasa など)からの画像が含まれている場合、それらが表示されなくなってしまいました。以前は問題なく正常に動作していました。

「いいね!」 1

サムネイルは現在、Discourse コアによって生成されるため、私にはほとんど影響を与えることができません。

サムネイル生成のロジックの多くは取り除かれ、Discourse に委ねられています。

こちらで提起することをお勧めします:Theme modifiers: A brief introduction

「いいね!」 2

ありがとう!そこに返信を作成しました。すべての画像がローカルサーバーにホストされていないため、更新については少し懐疑的です。

「いいね!」 2

設定で「アップロード」をリモートサーバーでホストしている場合、それでも動作するはずです。ただし、リモートサイトや非関連の第三者へのホットリンクは行われなくなります。

この部分はコアで処理されるようになったため、プラグインでこのコードベースの部分を管理するのはもはや意味がありません。彼らにフォローアップするのは全く正しい判断です :+1:

「いいね!」 4

ありがとうございます。状況は理解しました。当サイトでは画像を別のサーバーでホストしているため、簡単な解決策ではありません。多くの投稿があるため、関連サーバーに移行するのは現在非常に困難です。また、ローカルサーバーでホストするには容量が大きすぎます。

「いいね!」 1

私が抱えている問題は、イベントプラグインを有効にすると、以前議論した通り、モバイルでサムネイルが表示されなくなることです。これがあなたが言及していたことだと思いました。

サムネイルは私の環境では正常に表示されています。@fzngagan の指示通り、イベントを更新したことは確かですか?

「いいね!」 2

私がテストした直後にマージしたに違いないね。ありがとうみんな、もう全部動くよ!

「いいね!」 3

昨日アップデートした後、パフォーマンスがかなり低下しています。プロファイラで調べてみると、TLP が実行しているこのクエリが原因のようです──もしかしてインデックスが不足しているのでしょうか?

面白いことに、サイトをセーフモードで実行してもこのクエリは表示されたままです :thinking:

「いいね!」 1

機能画像。このクエリは永遠(と言っても数年ですが)変わっていません。本当に新しい問題でしょうか?

タグの作成日でソートしていますか?それは複雑なクエリになる可能性が非常に高いです。「最新」でソートする方が負荷は軽くなります。

当面はこの機能をオフにすることもできます。

テーマコンポーネントはコア API を使用しています。問題が深刻な場合は、当面はそれを使用するように切り替えることも可能です。

「いいね!」 1

PG12へのアップグレード以降、新しい仕様になったのかもしれませんね。タグの作成日順にソートする機能は、私たちのコミュニティにとってまさに中核的な機能です。TCに切り替えると、何が欠けることになるのでしょうか?

追伸:数年前に、あなたとフィーチャーされた行について同じ問題を議論した記憶がうっすらとあります。少し調べてみます。

「いいね!」 2

PG 12 アップグレードの再インデックス作成は完了しましたか?このプロセス中は多くのユーザーがパフォーマンス低下を報告していました(これらの報告は TLP とは関係ありません)。

ところで、考えてみると他にも何か変更があったかもしれません。現在は topic_thumbnails と結合する必要が生じていますが、それも以前のことであり、それ以降は他の報告はありません。以前は Topic オブジェクト内で image_url のホットリンクを使用していたため、より高速だった可能性があります(結合が一つ減るため)。しかし、コアの変更により、現在はそれができなくなっています。これが要因の一つかもしれません。

「いいね!」 1

はい、再インデックス作成は完了しました。トピックの作成日順にソートしても同じ問題が発生します。両方のクエリに対する EXPLAIN 出力は以下の通りです:

タグ付け日順にソート:

discourse=# explain SELECT "topics"."id", "topics"."title", "topics"."last_posted_at", "topics"."created_at", "topics"."updated_at", "topics"."views", "topics"."posts_count", "topics"."user_id", "topics"."last_post_user_id", "topics"."reply_count", "topics"."featured_user1_id", "topics"."featured_user2_id", "topics"."featured_user3_id", "topics"."deleted_at", "topics"."highest_post_number", "topics"."like_count", "topics"."incoming_link_count", "topics"."category_id", "topics"."visible", "topics"."moderator_posts_count", "topics"."closed", "topics"."archived", "topics"."bumped_at", "topics"."has_summary", "topics"."archetype", "topics"."featured_user4_id", "topics"."notify_moderators_count", "topics"."spam_count", "topics"."pinned_at", "topics"."score", "topics"."percent_rank", "topics"."subtype", "topics"."slug", "topics"."deleted_by_id", "topics"."participant_count", "topics"."word_count", "topics"."excerpt", "topics"."pinned_globally", "topics"."pinned_until", "topics"."fancy_title", "topics"."highest_staff_post_number", "topics"."featured_link", "topics"."reviewable_score", "topics"."image_upload_id" 
discourse-# FROM "topics" 
discourse-# INNER JOIN "topic_tags" 
discourse-# ON "topic_tags"."topic_id" = "topics"."id" 
discourse-# INNER JOIN "tags" ON "tags"."id" = "topic_tags"."tag_id" 
discourse-# WHERE ("topics"."deleted_at" IS NULL) 
discourse-# AND "topics"."visible" = TRUE 
discourse-# AND (NOT topics.closed AND NOT topics.archived AND topics.deleted_at IS NULL) 
discourse-# AND (topics.image_upload_id in (
discourse(#         SELECT image_upload_id FROM topic_thumbnails
discourse(#       ))
discourse-# AND (tags.id IN (1)) 
discourse-# 
discourse-# ORDER BY (
discourse(#  SELECT created_at FROM topic_tags
discourse(#         WHERE topic_id = topics.id
discourse(#         AND tag_id IN (1)
discourse(#         LIMIT 1
discourse(# )
discourse-# 
discourse-# DESC LIMIT 6; 
                                                                    QUERY PLAN                                                         
            
---------------------------------------------------------------------------------------------------------------------------------------
------------
 Limit  (cost=2631719.94..2631719.95 rows=6 width=569)
   ->  Sort  (cost=2631719.94..2631721.73 rows=717 width=569)
         Sort Key: ((SubPlan 1)) DESC
         ->  Nested Loop  (cost=0.43..2631707.09 rows=717 width=569)
               ->  Seq Scan on tags  (cost=0.00..4.51 rows=1 width=4)
                     Filter: (id = 1)
               ->  Nested Loop  (cost=0.43..2625737.13 rows=717 width=565)
                     ->  Seq Scan on topic_tags  (cost=0.00..860.33 rows=1539 width=8)
                           Filter: (tag_id = 1)
                     ->  Index Scan using topics_pkey on topics  (cost=0.43..1705.57 rows=1 width=561)
                           Index Cond: (id = topic_tags.topic_id)
                           Filter: ((deleted_at IS NULL) AND visible AND (NOT closed) AND (NOT archived) AND (deleted_at IS NULL) AND (
SubPlan 2))
                           SubPlan 2
                             ->  Seq Scan on topic_thumbnails  (cost=0.00..2966.64 rows=171664 width=8)
               SubPlan 1
                 ->  Limit  (cost=0.29..8.31 rows=1 width=8)
                       ->  Index Scan using index_topic_tags_on_topic_id_and_tag_id on topic_tags topic_tags_1  (cost=0.29..8.31 rows=1
 width=8)
                             Index Cond: ((topic_id = topics.id) AND (tag_id = 1))
 JIT:
   Functions: 25
   Options: Inlining true, Optimization true, Expressions true, Deforming true
(21 rows)

トピック日付順にソート:

discourse=# explain SELECT "topics"."id", "topics"."title", "topics"."last_posted_at", "topics"."created_at", "topics"."updated_at", "topics"."views", "topics"."posts_count", "topics"."user_id", "topics"."last_post_user_id", "topics"."reply_count", "topics"."featured_user1_id", "topics"."featured_user2_id", "topics"."featured_user3_id", "topics"."deleted_at", "topics"."highest_post_number", "topics"."like_count", "topics"."incoming_link_count", "topics"."category_id", "topics"."visible", "topics"."moderator_posts_count", "topics"."closed", "topics"."archived", "topics"."bumped_at", "topics"."has_summary", "topics"."archetype", "topics"."featured_user4_id", "topics"."notify_moderators_count", "topics"."spam_count", "topics"."pinned_at", "topics"."score", "topics"."percent_rank", "topics"."subtype", "topics"."slug", "topics"."deleted_by_id", "topics"."participant_count", "topics"."word_count", "topics"."excerpt", "topics"."pinned_globally", "topics"."pinned_until", "topics"."fancy_title", "topics"."highest_staff_post_number", "topics"."featured_link", "topics"."reviewable_score", "topics"."image_upload_id" FROM "topics" INNER JOIN "topic_tags" ON "topic_tags"."topic_id" = "topics"."id" INNER JOIN "tags" ON "tags"."id" = "topic_tags"."tag_id" WHERE ("topics"."deleted_at" IS NULL) AND "topics"."visible" = TRUE AND (NOT topics.closed AND NOT topics.archived AND topics.deleted_at IS NULL) AND (topics.image_upload_id in (
        SELECT image_upload_id FROM topic_thumbnails
      )) AND (tags.id IN (1)) ORDER BY (SELECT created_at FROM topic_tags
        WHERE topic_id = topics.id
        AND tag_id IN (1)
        LIMIT 1)
        DESC LIMIT 6; 
                                                                    QUERY PLAN                                                         
            
---------------------------------------------------------------------------------------------------------------------------------------
------------
 Limit  (cost=2631719.94..2631719.95 rows=6 width=569)
   ->  Sort  (cost=2631719.94..2631721.73 rows=717 width=569)
         Sort Key: ((SubPlan 1)) DESC
         ->  Nested Loop  (cost=0.43..2631707.09 rows=717 width=569)
               ->  Seq Scan on tags  (cost=0.00..4.51 rows=1 width=4)
                     Filter: (id = 1)
               ->  Nested Loop  (cost=0.43..2625737.13 rows=717 width=565)
                     ->  Seq Scan on topic_tags  (cost=0.00..860.33 rows=1539 width=8)
                           Filter: (tag_id = 1)
                     ->  Index Scan using topics_pkey on topics  (cost=0.43..1705.57 rows=1 width=561)
                           Index Cond: (id = topic_tags.topic_id)
                           Filter: ((deleted_at IS NULL) AND visible AND (NOT closed) AND (NOT archived) AND (deleted_at IS NULL) AND (
SubPlan 2))
                           SubPlan 2
                             ->  Seq Scan on topic_thumbnails  (cost=0.00..2966.64 rows=171664 width=8)
               SubPlan 1
                 ->  Limit  (cost=0.29..8.31 rows=1 width=8)
                       ->  Index Scan using index_topic_tags_on_topic_id_and_tag_id on topic_tags topic_tags_1  (cost=0.29..8.31 rows=1
 width=8)
                             Index Cond: ((topic_id = topics.id) AND (tag_id = 1))
 JIT:
   Functions: 25
   Options: Inlining true, Optimization true, Expressions true, Deforming true
(21 rows)
「いいね!」 2

役に立ちます。ありがとう。

いつ着手できるか確信が持てず、すみません。

また、新しい「join」は改善されるかもしれませんが、それを削除することはできません。(いや、削除できました!)

「いいね!」 1

OK、@bartv とオフラインで協力してこれを改善しました。

これは TC ではなく、プラグインにのみ影響します。

これは、フォーカス画像を使用しているサイトにとって大きな改善となるため、アップグレードすることをお勧めします。

「いいね!」 5

あなたは本当に素晴らしいです!:guitar:

「いいね!」 3

あなたの詳細な探偵活動も非常に重要でした、バート。ありがとう。

「いいね!」 3

こんにちは。containers アプリの app.yml に git clone URL を追加しましたが、アプリを再構築しようとすると以下のエラーが発生します。

(<unknown>): found a tab character that violate indentation while scanning a plain scalar at line 91 column 13 -e LANG=en_US.UTF-8

その結果、ウェブサイトが動作しなくなりました。

プラグインの git clone URL を削除したところ、再び正常に動作するようになりました。

「いいね!」 1

この問題はこのプラグイン固有のものではないと思います。app.yml ではタブを使用できません。スペースを使用してください。

「いいね!」 2

はい、すみません。プラグインの最新行をコピー&ペーストして、git clone の URL を変更しました。これで動作します。ありがとうございます :slight_smile:

「いいね!」 2