Discourse embed blocked on "Loading Discussion..."


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);

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 ?


1 Like

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 :


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


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 :


Ok problem solved :smile:

it was


I forgot the .net, dumb of me.

Thank you so mu for your help