Set topic title with Discourse Embed

AI-generated summary

sarahann is experiencing an issue with auto-created topics in Discourse, where all topics have the title “Sign in to your account”. The title seems to be grabbed from the website’s sign-in page, which is served to the anonymous request made by Discourse. simon suggested checking if the site has an RSS or Atom feed and enabling the ‘Import posts via RSS/Atom’ setting. However, sarahann confirmed that their site does not use RSS or Atom feed. According to eviltrout, there is no way to pass the title through, and the website’s extra layer of security might be causing the issue.

Hello!

I recently set up embedded comments on my website using this wonderful tutorial (Embed Discourse comments on another website via Javascript).

My topics are being auto-created by Discourse. However, all the generated topics have the same title “Sign in to your account”.

I assume that the crawler is somehow landing on my website’s sign-in page first and grabbing that page title as the topic title. This doesn’t make too much sense to me because I tried this on a public page (one that does not require authentication). So maybe I am misunderstanding what the craweler does in order to scrape for the page title, description etc.

Regardless, I am not sure if I can change the flow of my current website, so I was wondering if there was a way to set the topic title in Javascript (possibly in the DiscourseEmbed object). Or if I needed to change some crawler settings?

Any thoughts?

Does your site have an RSS or Atom feed? If so, have you tried enabling the ‘Import posts via RSS/Atom’ setting? It makes a difference in terms of how Discourse tries to retrieve the post.

Also to confirm there is no way to pass the title through. There must be some reason your web site is serving the sign in page to the anonymous request Discourse is making.

I just checked and it looks like we don’t use RSS or Atom feed.

I have also been informed that we have an extra layer of security that is causing this hiccup.

I figured our site was doing something weird and I wanted to see if there was a way to pass the topic title or body to Discourse in JS. Thanks for getting back to me!