Issues with embedding from RSS

AI-generated summary

The discussion revolves around issues with embedding RSS feeds into Discourse. laurakalbag initially reports three issues: attributing posts to the correct author, setting the timestamp to the original post’s publishing time, and maintaining chronological order. eviltrout responds that the embedding tool was meant for “going forward” and doesn’t support dates via embedding, but it’s something that can be added.

Later, enoch85 and geoff777 report issues with RSS feeds being posted to the “Uncategorized” category, despite setting the correct category. simon explains that the category is based on the domain of the feed’s link attributes, not the domain of the feed itself. He provides guidance on how to set the correct category and updates the plugin’s text to make it clearer.

geoff777 asks if the fix is for feeds not stopping or for feeds going into the “Uncategorized” category. simon clarifies that he fixed the issue with feeds not stopping when the plugin is disabled.

geoff777 expresses confusion about the plugin’s configuration and suggests that it should be able to automatically slice and dice the URL into Allowed Hosts and Path Whitelist without requiring manual input. simon agrees that configuring the plugin can be difficult and provides an example of how to set it up correctly.

efeefe revisits the topic and reports that the plugin is not likely to work for their needs due to the link attribute in each entry pointing to a different domain. However, they later find a solution by generating a different feed from the source.

efeefe reports another issue where the plugin is not fetching the contents of each item, and the body of the topic says “this is a discussion related to this original message” with a button to “show full message” that stays “loading” indefinitely. simon suggests that the problem is due to Discourse not finding the content on the page and provides guidance on configuring the embed whitelist selector site setting.

efeefe reports that the suggested solution did not work, and simon provides additional suggestions for whitelisting and clearing the cache.

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.

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”

여기서도 같은 문제가 발생합니다.
이 플러그인을 작동시키기 위해 여러 번 시도해 보았습니다.
모든 주제가 미분류 카테고리에 생성되고 있습니다.

플러그인을 꺼두었는데도 여전히 작동하고 있습니다!
주제를 삭제하는 게 지긋지긋합니다.
삭제했던 제목을 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 속성에 사용되는 도메인에 대해서만 호스트 레코드를 추가하면 되는지입니다. 제 사이트에서 직접 테스트해 보고 여기서 결과를 공유하겠습니다.

네, 현재 설정은 다음과 같습니다:

이렇게 하면 더 정확해 보이나요?

허용된 호스트(Allowed Hosts) 섹션에 설정한 도메인은 올바르게 보입니다. 다만, 현재 설정된 경로 화이트리스트(Path Whitelist) 설정은 잘못된 것으로 보입니다. 이 설정의 목적은 웹사이트에서 서로 다른 경로에 있는 게시물을 특정 Discourse 카테고리에 게시할 수 있도록 하는 것입니다. www.svedala.se의 모든 게시물을 RSS 카테고리에 게시하려면 이 설정을 비워 두시면 됩니다.

도메인에서 서로 다른 경로가 서로 다른 Discourse 카테고리로 게시되도록 하려면, 추가하는 경로는 와일드카드 기호로 끝나야 합니다. 예를 들어, /paverka/nyheter/.*와 같이 설정할 수 있습니다.

이 문제에 관심을 가져주셔서 감사합니다. 잠시 실행해 본 후 다시 연락드리겠습니다.:+1:

안녕하세요, 그렇게 해 보았습니다. 그런데도 여전히 미분류 카테고리에 피드가 들어오고 있습니다.
RSS 폴링 플러그인은 꺼져 있고, 임베딩 부분은 완전히 비어 있으며 호스트를 추가하라고 요구하고 있습니다.

아니요. 플러그인을 업데이트하여 플러그인을 비활성화하면 피드에서 주제가 생성되는 것을 완전히 중단하도록 하겠습니다.

이 문제를 수정하기 위한 패치를 플러그인 저장소에 업로드했습니다. 해당 코드가 검토를 거쳐 곧 플러그인에 추가될 것으로 예상됩니다.

일단, 제가 이전에 드린 피드 비활성화 관련 조언은 잘못된 것이었습니다. 피드 토픽이 생성되지 않도록 하려면 플러그인을 다시 활성화한 후 RSS 폴링 설정 링크로 이동해야 합니다. 해당 페이지에서 입력했던 피드 URL을 삭제하세요.

이 작업을 완료하면 피드 토픽이 더 이상 생성되지 않을 것입니다.

하이, 시몬. 감사합니다.

조금 이해가 안 되는 부분이 있습니다.
분류되지 않은 카테고리로 들어가는 피드 문제를 수정한 건가요, 아니면 피드가 멈추지 않는 문제를 수정한 건가요?

플러그인이 비활성화될 때 피드가 멈추지 않는 문제를 수정했습니다. 또한 피드 URL을 설정할 때 플러그인이 표시하는 텍스트를 업데이트하여, 피드의 주제가 속할 카테고리를 어떻게 설정하는지 명확히 했습니다. 피드가 게시되는 카테고리는 피드의 link 속성 도메인에 기반합니다. 이는 변경할 수 없는 부분입니다.

제가 만든 PR은 아직 병합되지 않았습니다. 하지만 곧 사용 가능할 것입니다.