Issues with embedding from RSS

I’m having a few issues with embedding from RSS. I’m going to enable comments for each original post, but I want to ensure that the comments end up in the right location in Discourse with the correct attributed author and publishing date.

Issue 1: embed username key from feed

I need each topic to be correctly attributed to the right author. I’m set up as the default. My RSS has a format of <discourseUsername>jo</discourseUsername>, so I entered discourseUsername as the value for embed username key from feed. It just attributes all topics to the default user. Have I done something wrong here?

Issue 2: pubdates

I need each topic’s timestamp to be the same as the original post publishing time. Otherwise adding our RSS feed of ~70 posts floods the forum with outdated topics that have recent timestamps. (Pushing newer manually-created topics down.) Is there a way to set the timestamp for topics pulled from RSS to the same time as the RSS <pubdate>?

Issue 3: chronology

Maybe related to Issue 3, the topics imported via RSS are not in the same chronological order as the original posts.

I hope none of these are stupid questions! Any help, suggestions, or workarounds would be much appreciated! :smile:

We will take a look, @eviltrout is working on improved embedding for this release.

Thanks! It’d also be pretty cool if you could feed different (multiple) RSS feeds into different categories, or put RSS-fed topics into different categories dependent on a key value.

Our use case is that we have a couple of blogs, one “newsy” and one “developer-y”, I’m using a combined RSS feed for now so that we can pull them all into Discourse, but having their separate posts/topics in their own categories would make it easier for audiences who favour one blog or the other.

That looks correct to me. Can you give me a sample of the RSS feed you’re trying to import?

Another option is to use the embed by username site setting if you are okay with all posts coming from the same user.

This is unfortunately not possible right now. The embedding tool was originally meant to be “going forward” so it doesn’t have support for dates via embedding. It’s something we could definitely look at adding. (This is the same as issue 3 as far as I can tell).

Feed is https://ind.ie/rss with items structured like:

<item> <title>The Social Web: A Glorious Dystopia</title> <link>https://ind.ie/blog/the-social-web-a-glorious-dystopia/</link> <guid>https://ind.ie/blog/the-social-web-a-glorious-dystopia/</guid> <description>&lt;p&gt;This week we&apos;re going to dive straight into the activities of those cheeky corporations. There&apos;s so much to share!&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://ind.ie/blog/the-social-web-a-glorious-dystopia/&quot;&gt;Read the full post on the Ind.ie blog&lt;/a&gt;.&lt;/p&gt;</description> <pubDate>Fri, 24 Jul 2015 18:30:00 GMT</pubDate> <author>laura@ind.ie (Laura Kalbag)</author> <discourseUsername>laura</discourseUsername> </item>

I’ve got the embed by username set to my username, but also got embed username key from feed. Will these conflict? I’d rather have them all assigned to the original author, not just me. Though I write the most blog posts, so having it set to me isn’t a bad default…

That makes sense. We’re going to use it “going forward” now too :smile:

It’s not exactly the same as issue 3 (but would have the same solution.) Even though the RSS is imported all at once, the topics are still ordered (because that’s how they’re presented in Discourse.) However it’s unclear what the topics are ordered by, as it’s not the same order as the <item>s in the RSS.

こんにちは!

RSS の埋め込みについても問題が発生しています。

私の設定は以下の通りです:

しかし、すべての RSS 投稿が「未分類」カテゴリに分類されてしまいます。何か間違えて設定してしまったのでしょうか?

再現手順:

  1. 埋め込みフィードを作成(この場合は svedala.se から)
  2. 設定に実際の RSS アドレスを入力(../nyheter/ だけでなく)
  3. discobot として投稿
  4. ポーリング間隔を 5 分に設定
  5. 10 分(!)待機してポーリングを完了させる
  6. 投稿が「未分類」に分類されていることを確認

私も同じ問題が発生しています。
このプラグインを動作させるために何度か試しましたが、すべて未分類のカテゴリにトピックが作成されてしまいます。

プラグインを無効にしても、まだ動作しています!
トピックの削除にうんざりしています。
もしかすると、同じ古いフィードかもしれません。私がこれまでに削除したタイトルを5回も認識し始めています。
プラグインを停止するには、app.yml を編集して再構築する必要があるのでしょうか?

非常に役立つ機能なので、期待通りに動作してほしいです。
カテゴリと連携して動作させている人はいますか?

返信が遅れて申し訳ありません。RSS フィード項目が投稿されるカテゴリは、フィード項目の link 属性で使用されているドメインに基づいて決定されます。RSS フィード自体のドメインに基づくわけではありません。例えば、RSS フィードが www.example.com にある場合でも、RSS フィード内の link 属性が blog.example.com を指している場合、blog.example.com のホストエントリを追加することで、フィードのカテゴリを設定する必要があります。

上記の方法で解決できない RSS カテゴリに関する問題が発生している場合は、お知らせください。調査いたします。

また、プラグインで使用される文言を更新し、フィード投稿のカテゴリ設定方法を明確にします。

これは修正が必要です。プラグインが無効化されている場合、RSS フィードからトピックが作成され続けるべきではありません。当面の間は、プラグインのドメインに対して設定したホストエントリを削除することで、トピックの作成を停止できるはずです。

@simon

不明瞭でしたら申し訳ありません。完全な URL は以下の通りです:Nyheter

RSSフィードを確認したところ、フィード項目のlink属性にはwww.svedala.seドメインが使用されていました。スクリーンショットのホストレコードはsvedala.seドメイン用です。www.svedala.seのホストレコードを追加し、カテゴリをRSSに設定してみてください。この変更後、正しいカテゴリに投稿されない場合はお知らせください。

確認したい点として、RSSフィードのドメイン自体にホストレコードを作成する必要があるのか、それともフィードのlink属性で使用されているドメインに対してのみホストレコードを追加すればよいのか、という点です。この件については、私のサイトでもテストを行い、結果をこちらで報告いたします。

はい、これが現在の設定です:

これでより正確に見えるでしょうか?

許可されたホストセクションに設定したドメインは正しいようです。ただし、パスホワイトリストの設定が間違っていると思われます。この設定の目的は、ウェブサイトの異なるパスにある投稿を特定の Discourse カテゴリに公開できるようにすることです。www.svedala.se からのすべての投稿を RSS カテゴリに公開したい場合は、この設定を空白のままにしてください。

ドメイン内の異なるパスを異なる Discourse カテゴリに公開したい場合は、追加するパスの末尾にワイルドカード記号を付ける必要があります。例えば、/paverka/nyheter/.* のようにします。

ご確認いただきありがとうございます。しばらく実行し、後ほどご連絡いたします。:+1:

こんにちは、その操作は行いました。しかし、未分類カテゴリにフィードが表示されたままです。
RSS ポーリングプラグインはオフになっています。
埋め込みは完全に空で、ホストの追加を求めています。

お困りのようですね。プラグインを完全に無効化した場合、フィードからトピックが作成されないようにプラグインを更新いたします。

この問題の修正をプラグインのリポジトリにプッシュしました。そのコードはレビューされ、近日中にプラグインに追加されることを願っています。

現時点では、フィードを無効化するという私のアドバイスは誤りでした。フィードトピックの作成を防ぐには、まずプラグインを再度有効化し、次に「RSS ポーリング」設定リンクに移動してください。そのページで入力したフィード URL を削除します。

これを行えば、フィードトピックが作成されなくなります。

こんにちは、サイモンさん。ありがとうございます。
少し不明確な点があります。
「未分類」カテゴリにフィードが流入する問題を修正されたのでしょうか、それともフィードが停止しない問題を修正されたのでしょうか?

プラグインが無効化されたときにフィードが停止しないという問題を修正しました。また、フィード URL を設定する際に表示されるテキストを更新し、フィードのトピックのカテゴリを設定する方法が明確になるようにしました。フィードが公開されるカテゴリは、フィードの link 属性のドメインに基づいて決定されます。これは変更できません。

私が提出した PR はまだマージされていませんが、まもなく利用可能になるはずです。