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.

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”

Stesso problema qui.
Ho provato diverse volte a far funzionare questo plugin.
Tutti gli argomenti vengono creati nella categoria “Non classificati”.

Ho disattivato il plugin e continua a funzionare!
Sono stanco di eliminare gli argomenti.
Potrebbero essere gli stessi feed di sempre, dato che sto iniziando a riconoscere i titoli che ho già eliminato per la quinta volta.
Devo modificare il file app.yml e ricostruire l’app per disattivare il plugin?

Preferirei che funzionasse come previsto, poiché sarebbe molto utile.
Qualcuno è riuscito a farlo funzionare con le categorie?

Scusa per il ritardo nella risposta. La categoria in cui vengono pubblicati gli elementi del feed RSS è determinata dal dominio utilizzato nell’attributo link dell’elemento del feed, non dal dominio del feed RSS stesso. Ad esempio, se il tuo feed RSS si trova su www.esempio.com, ma l’attributo link nel feed punta a blog.esempio.com, dovrai impostare la categoria per il feed aggiungendo una voce host per blog.esempio.com.

Se gli utenti riscontrano problemi con le categorie RSS che non possono essere risolti con il metodo descritto sopra, faccelo sapere e verificheremo cosa sta succedendo.

Agiornerò il testo utilizzato dal plugin per chiarire come impostare le categorie per i post del feed.

Questo deve essere corretto. Il plugin non dovrebbe continuare a creare argomenti dal feed RSS quando è disabilitato. Per ora, dovresti essere in grado di impedire la creazione di nuovi argomenti eliminando la voce host che hai configurato per il dominio del plugin.

@simon

Scusa se non sono stato chiaro. L’URL completo è: Nyheter

Quando guardo il tuo feed RSS, gli attributi link degli elementi del feed stanno utilizzando il dominio www.svedala.se. Il record host nello screenshot è per il dominio svedala.se. Prova ad aggiungere un record host per www.svedala.se e impostane la categoria su RSS. Potresti farci sapere se, dopo questa modifica, non viene ancora pubblicato nella categoria corretta?

Una cosa che devo confermare è se sia necessario creare un record host per il dominio del feed RSS o se i record host debbano essere aggiunti solo per i domini utilizzati negli attributi link del feed. Farò una prova sul mio sito e farò rapporto qui.

Ok, quindi questa è l’impostazione attuale:

Ti sembra più accurato?

Il dominio che hai impostato nella sezione Host consentiti sembra corretto. Penso però che l’impostazione Path Whitelist sia errata. Lo scopo di questa impostazione è permetterti di pubblicare post situati in percorsi diversi del tuo sito web in categorie Discourse specifiche. Puoi lasciare l’impostazione vuota se desideri pubblicare tutti i post da www.svedala.se nella tua categoria RSS.

Se desideri che percorsi diversi del dominio vengano pubblicati in categorie Discourse diverse, il percorso che aggiungi deve terminare con un carattere jolly. Ad esempio, /paverka/nyheter/.*

Grazie per la vostra attenzione. Farò girare il processo per un po’ di tempo e vi farò sapere.:+1:

Ciao, l’ho fatto. Ricevo comunque feed nella categoria “Non categorizzati”.
Il plugin di polling RSS è disattivato.
L’embedding è completamente vuoto e mi chiede di aggiungere un host.

Oh no. Aggiorneremo il plugin in modo che la sua disattivazione completa impedisca la creazione di argomenti dal feed.

Ho spinto una correzione per questo problema nel repository del plugin. Il codice verrà revisionato e, si spera, aggiunto al plugin a breve.

Per ora, il consiglio che ti ho dato di disabilitare il feed era errato. Per impedire la creazione di argomenti relativi ai feed, devi riattivare il plugin, quindi andare al link delle impostazioni di “RSS Polling”. In quella pagina, elimina l’URL del Feed che hai inserito.

Una volta fatto ciò, gli argomenti dei feed non dovrebbero più essere creati.

Ciao Simon, grazie.

Sono un po’ confuso.
Hai risolto il problema dei feed che finiscono nella categoria ‘Non classificati’ o quello dei feed che non si fermano?

Ho risolto il problema per cui i feed non si fermavano quando il plugin era disabilitato. Ho anche aggiornato il testo visualizzato dal plugin quando imposti un URL del feed, per chiarire come impostare la categoria per gli argomenti di un feed. La categoria in cui viene pubblicato un feed è basata sul dominio degli attributi link del feed. Questo non è qualcosa che può essere modificato.

La PR che ho creato non è ancora stata unita. Dovrebbe essere disponibile a breve.