Discourse Integration with no connection

Hey,
I need some help with the Ghost x Discourse Integration.
I followed the instructions on this site but it does not work.

Theres a connection error and no search for that problem was described here or in the Discourse Forum. So maybe someone is here to help?

I use the reiro Theme by fueko.

here is my code snippet:

<div id='discourse-comments'></div>
<meta name='discourse-username' content='MY_USERNAME'>

<script type="text/javascript">
  DiscourseEmbed = {
    discourseUrl: 'https://subdomain.domain.de/',
    discourseEmbedUrl: '{{url absolute="true"}}',
    // className: 'CLASS_NAME',
  };

  (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>

type or paste code here

<div id='discourse-comments'></div>
<meta name='discourse-username' content='DISCOURSE_USERNAME'>

<script type="text/javascript">
  DiscourseEmbed = {
    discourseUrl: 'https://community.uebergabe.de/',
    discourseEmbedUrl: 'EMBED_URL',
    // className: 'CLASS_NAME',
  };

  (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 get this Error and can’t figure out, why:

If you need further details to help, i can provide it.

Thanks & Cheers
Christian

1 Like

Can you open the browser console (f12) and report any errors there too, please?

I use the Arc-Browser. Thats why there are so many errors?
In Safari, the Integration doesn’t work as well, but there is no banner with the error message shown.

The third to last error is the one that matters - community.uebergabe.de (I’m guessing that’s your Discourse instance) isn’t allowing your Ghost site to embed it. You’ll have to configure it via community.uebergabe.de/admin/customize/embedding

3 Likes

Of course I configured it, otherwise I could not get the Code from Discourse.

When I disable CSP in Discourse, another Error comes up…

You allowed uebergabe.de, not www.uebergabe.de.

2 Likes

Got it, that works. I tried https://… but it didn’t work. The idea to use www. never came into my mind.
Thanks!

2 Likes