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:

3 个赞

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

3 个赞

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.

2 个赞

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.

Hi!

I also have issues with embedding RSS.

These are my settings:

Yet all my RSS posts ends up in the category “Uncategorized”. Have I done something wrong here?

Steps to repdocude:

  1. Create an embedded feed (in this case from svedala.se)
  2. Set the real RSS address in the settings (not just the …/nyheter/)
  3. Post as discobot
  4. Set 5 minutes polling interval
  5. Wait 10(!) minutes for it ti poll
  6. See that posts are posted in “Uncategorized”
2 个赞

我也遇到了同样的问题。
我尝试了多次想让这个插件正常运行。
所有话题都被创建在“未分类”类别下。

我已经关闭了插件,但它仍然在运行!
我受够了删除话题。
它们可能是相同的旧订阅源,因为我开始认出我已经删除了 5 次的标题。
我是否需要编辑 app.yml 并重新构建来停止这个插件?

我更希望它能按预期工作,因为它会非常有用。
有人成功让它在分类下运行了吗?

很抱歉这么晚才回复。RSS 订阅项被发布到的分类是基于订阅项 link 属性中使用的域名,而不是基于 RSS 订阅本身的域名。例如,如果您的 RSS 订阅位于 www.example.com,但订阅中的 link 属性指向的是 blog.example.com,那么您需要通过为 blog.example.com 添加主机条目来设置该订阅的分类。

如果有人在 RSS 分类方面遇到问题,且无法通过上述方法解决,请告诉我们,我们将调查具体情况。

我将更新插件所使用的文案,以明确说明如何为订阅帖子设置分类。

这确实需要修复。当插件被禁用时,它不应继续从 RSS 订阅创建主题。目前,您可以通过删除为该插件域名设置的主机条目,来阻止新主题的创建。

@simon

抱歉,如果我说得不够清楚。完整网址是:Nyheter

1 个赞

查看您的 RSS 源时,我发现条目中的 link 属性使用的是 www.svedala.se 域名。而您截图中的主机记录是针对 svedala.se 域名的。请尝试为 www.svedala.se 添加一条主机记录,并将其类别设置为 RSS。修改后,如果仍无法发布到正确的类别,请告知我们。

此外,我需要确认一下:您是否必须为 RSS 源所使用的域名创建主机记录,还是只需为 link 属性中出现的域名添加主机记录即可?我会在自己的网站上进行测试,并在此向您反馈结果。

1 个赞

好的,这是当前的设置:

您觉得这样看起来更准确吗?

您在“允许的主机”部分设置的域名看起来是正确的。不过,我认为您的“路径白名单”设置有误。该设置的目的是允许您将网站上不同路径的文章发布到特定的 Discourse 分类中。如果您希望将来自 www.svedala.se 的所有文章发布到您的 RSS 分类中,可以留空该设置。

如果您希望将来自该域名的不同路径发布到不同的 Discourse 分类中,您添加的路径应以通配符结尾。例如:/paverka/nyheter/.*

2 个赞

感谢您的关注,我会让它运行一段时间后再向您反馈。:thumbsup:

1 个赞

你好,我已经这样做了。但我仍然在“未分类”类别中看到内容源。
RSS 轮询插件已关闭。
嵌入功能完全为空,并提示我添加一个主机。

[quote=“geoff777, 帖子:18, 主题:31358”]
我仍然在“未分类”类别中收到订阅源内容。
RSS 轮询插件已关闭。
嵌入功能完全空白,并提示我需要添加一个主机。[/quote]

哦,不。我们将更新该插件,以便在完全禁用插件时,停止从订阅源创建主题。

1 个赞

我已针对此问题向插件仓库推送了修复代码。该代码将经过审查,并有望很快被添加到插件中。

目前,我之前关于禁用动态的建议是错误的。若要阻止创建动态主题,您需要重新启用插件,然后前往“RSS 轮询”设置链接。在该页面上,删除您已输入的动态 URL。

完成上述操作后,将不再创建动态主题。

3 个赞

你好,Simon,谢谢。

我有点不太清楚。
你是指已经修复了进入“未分类”类别的源,还是指那些没有停止的源?

我修复了插件禁用后源订阅仍无法停止的问题。我还更新了插件在设置源 URL 时显示的文字,以明确如何为源的主题设置分类。源订阅发布到的分类取决于其 link 属性的域名。这一点无法更改。

我提交的 PR 尚未合并,但应该很快就会可用。

2 个赞