# \[solved\] Error Embedding

**URL:** https://meta.discourse.org/t/solved-error-embedding/57276
**Category:** Support
**Created:** [February 12, 2017, 5:23pm UTC](https://meta.discourse.org/t/solved-error-embedding/57276 "2017-02-12T17:23:57Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Michael321](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@Michael321](https://meta.discourse.org/u/Michael321)
#### Post date: [February 12, 2017, 5:23pm UTC](https://meta.discourse.org/t/solved-error-embedding/57276/1 "2017-02-12T17:23:57Z")

</div>

Hi, similar to [this post](https://meta.discourse.org/t/403-error-embedding-comments/42923), I’m getting errors embedding comments in a static site: [https://bigsmall.io/articles/action-brands-are-important-urgent-credible/](https://bigsmall.io/articles/action-brands-are-important-urgent-credible/)

In the browser console, I it says “Loading Discussion”, then “Error Embedding” with this in the JavaScript console:

```plaintext
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://community.bigsmall.io') does not match the recipient window's origin ('https://bigsmall.io').

```

The topics are created in Discourse - I see them in the “Let’s get this discussion started” page listing topics. From the dates, the topics may have been made from the RSS feed integration.

Any suggestions?

---

<div class="post-metadata">

### Author: ![Michael321](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@Michael321](https://meta.discourse.org/u/Michael321)
#### Post date: [February 12, 2017, 5:42pm UTC](https://meta.discourse.org/t/solved-error-embedding/57276/2 "2017-02-12T17:42:24Z")

</div>

Bam! Fixed it. Make sure the discourseEmbedUrl is a full URL, not a relative path. E.g.:

```
              var url="https://dev.bigsmall.io/articles/action-brands-are-important-urgent-credible/"
              DiscourseEmbed = { discourseUrl: 'https://community.bigsmall.io/',
                                 discourseEmbedUrl: 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);
              })();

```

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [February 12, 2017, 9:25pm UTC](https://meta.discourse.org/t/solved-error-embedding/57276/3 "2017-02-12T21:25:27Z")

</div>

@eviltrout can we check for this somehow and warn if it is a partial URL?

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [February 13, 2017, 4:19pm UTC](https://meta.discourse.org/t/solved-error-embedding/57276/4 "2017-02-13T16:19:22Z")

</div>

Sure. It can only show in the Javascript console but it would have helped this person diagnose their issue:

[https://github.com/discourse/discourse/commit/c40d8d37ddf75298ca837a60f42251e6f1fdf3d8](https://github.com/discourse/discourse/commit/c40d8d37ddf75298ca837a60f42251e6f1fdf3d8)

---

<div class="post-metadata">

### Author: ![Michael321](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@Michael321](https://meta.discourse.org/u/Michael321)
#### Post date: [February 13, 2017, 4:37pm UTC](https://meta.discourse.org/t/solved-error-embedding/57276/5 "2017-02-13T16:37:04Z")

</div>

Yes! That would have saved us some time. This is a really cool feature BTW, it turns drive-by comments into a community which is cool.

I made a quick comment on the PR about protocol independent URLs. Cheers and thanks for an awesome project!

Mike

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [February 13, 2017, 11:58pm UTC](https://meta.discourse.org/t/solved-error-embedding/57276/6 "2017-02-13T23:58:23Z")

</div>


