Discourse embed blocked on "Loading Discussion..."

AI-generated summary

The discussion “Discourse embed blocked on ‘Loading Discussion…’” revolves around an issue with embedding a Discourse instance on a Ghost blog. Anthony_Lethuillier reports that the Discourse frame displays “Loading Discussion…” instead of the actual discussion. He shares the code used to embed the Discourse instance and mentions that there are no errors in the Discourse logs.

After troubleshooting, Anthony_Lethuillier discovers that the issue lies in the difference between the actual URL of the Discourse topic and the URL the embed part is looking for. codinghorror suggests that the instructions might need clarification.

riking points out that the discourseEmbedUrl should be the canonical URL of the blog post, not a placeholder like 'test'. Anthony_Lethuillier updates the discourseEmbedUrl but still encounters the issue.

Ultimately, Anthony_Lethuillier solves the problem by correcting the discourseEmbedUrl to include the missing .net domain extension. He expresses gratitude for the help received.

Hello,

I have set up a Discourse instance on my server and it works fine.

But when I try to embed it on my Ghost blog the Discourse frame just shows

“Loading Discussion…”

Here is the code I insert :

<div id='discourse-comments'></div>

<script type="text/javascript">
  DiscourseEmbed = { discourseUrl: 'http://discourse.domain.net/',
                                discourseEmbedUrl: 'http://subdomain.domain{{url}}'};

  (function() {
    var d = document.createElement('script'); d.type = 'text/javascript'; d.async = true;
    d.src = DiscourseEmbed.discourseUrl + 'javascripts/embed.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);
  })();
</script>

I use the admin username I set up first and the allowed host is blog.domain.net

The discourse.domain.net/logs gives me no errors

Any advice on what to do next ?

Thanks

So i’ve tried a few things and I think I have located the problem.

The comment topics are created properly in Discourse and they have the following url :

http://discourse.domain.net/t/name_of_blog_post/14/1

But I checked what url the embed part was looking for and Firefox gave me this

http://discourse.domain.net/embed/comments?embed_url=%2Fname_of_blog_post%2F

Why does that difference exist ?

Anything to add here @eviltrout? Something we can make clearer in the instructions?

I think this should be the canonical URL of the blog post, not test.

Sorry I hadn’t updated my original posts,

I tried :

discourseEmbedUrl: 'http://subdmomain.domain{{url}}' and the result is the same

It gives me the following request :

http://discourse.domain.net/embed/comments?embed_url=http%3A%2F%2Fsubdmomain.domain%2Fname_of_blog_post%2F

Ok problem solved :smile:

it was

'http://subdmomain.domain{{url}}' 

I forgot the .net, dumb of me.

Thank you so mu for your help