# Error embedding Discourse

**URL:** https://meta.discourse.org/t/error-embedding-discourse/148601
**Category:** Support
**Created:** [April 20, 2020, 12:07pm UTC](https://meta.discourse.org/t/error-embedding-discourse/148601 "2020-04-20T12:07:49Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Roque\_Terrani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roque_terrani/32/177540_2.png) [@Roque\_Terrani](https://meta.discourse.org/u/Roque_Terrani)
#### Post date: [April 20, 2020, 12:07pm UTC](https://meta.discourse.org/t/error-embedding-discourse/148601/1 "2020-04-20T12:07:49Z")

</div>

Hi! I am part of the team of Grow with Jane, we are a web platform for cannabis growers. We already have a very successful tracking app but we are trying to create an online community now. We have a Wordpress installed where we publish some of our user plants (we are not using posts, it’s a custom plugin that we made). And now we want to add a comment box in each growlog.  
We are loving Discourse, we think that is going to be a game changer for our community, but I really need to have the embeding working.

I am trying to embed my discourse in my dev website and is not working.

My browser is throwing me this error ( I added some spaces in the urls because I can’t post more than one link)

> Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided (‘’) does not match the recipient window’s origin (‘’).  
> VM1412 embed-application-08a52625979d3d44aac8a2dedf5a1a662fec81ffe8a9ebc2e6eefb15b2980874.js:1 Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided (‘https:// discourse.growithjane. com’) does not match the recipient window’s origin (‘https:// dev.growithjane. com’).

I enabled CORS in app.yml  
I added my deb website domain in the CORS origin configuration  
I added a host in the embedding configuration  
I added the HTML code in my page

My testing page: [https://dev.growithjane.com/test-embed/](https://dev.growithjane.com/test-embed/)  
My configuration

 ![Admin - Grow with Jane - DEV ENVIRONMENT 2020-04-20 08-49-44](https://global.discourse-cdn.com/meta/original/3X/4/c/4c97e7a22a69550c1f5b4ef6520c5d95b396899e.png)

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [April 20, 2020, 1:01pm UTC](https://meta.discourse.org/t/error-embedding-discourse/148601/2 "2020-04-20T13:01:42Z")

</div>

Have you looked at wp-discourse? Is there something you want to do here that the plugin won’t achieve?

---

<div class="post-metadata">

### Author: ![Roque\_Terrani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roque_terrani/32/177540_2.png) [@Roque\_Terrani](https://meta.discourse.org/u/Roque_Terrani)
#### Post date: [April 20, 2020, 1:05pm UTC](https://meta.discourse.org/t/error-embedding-discourse/148601/3 "2020-04-20T13:05:09Z")

</div>

Yes I looked it, that plugin seems to work with posts. But I am creating dynamic pages in a custom wordpress plugin, so I need to do a custom implementation.

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [April 20, 2020, 1:47pm UTC](https://meta.discourse.org/t/error-embedding-discourse/148601/4 "2020-04-20T13:47:40Z")

</div>

It works with posts and pages.

By dynamic pages do you mean via a page builder, or?

---

<div class="post-metadata">

### Author: ![Roque\_Terrani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roque_terrani/32/177540_2.png) [@Roque\_Terrani](https://meta.discourse.org/u/Roque_Terrani)
#### Post date: [April 20, 2020, 2:51pm UTC](https://meta.discourse.org/t/error-embedding-discourse/148601/5 "2020-04-20T14:51:57Z")

</div>

Yes, exactly.  
I just configured the wordpress plugin and is working for normal posts. So I suspect that isn’t a problem with the configuration, maybe a problem with the crawler.  
I will post any update.

Thanks!

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [April 20, 2020, 2:54pm UTC](https://meta.discourse.org/t/error-embedding-discourse/148601/6 "2020-04-20T14:54:58Z")

</div>

It’s not enabled by default, check the plugin settings.

---

<div class="post-metadata">

### Author: ![Roque\_Terrani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roque_terrani/32/177540_2.png) [@Roque\_Terrani](https://meta.discourse.org/u/Roque_Terrani)
#### Post date: [April 30, 2020, 6:50pm UTC](https://meta.discourse.org/t/error-embedding-discourse/148601/7 "2020-04-30T18:50:37Z")

</div>

I found the problem!  
I didn’t configure “Username for topic creation” in “Embedding Settings”.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [May 30, 2020, 6:50pm UTC](https://meta.discourse.org/t/error-embedding-discourse/148601/8 "2020-05-30T18:50:43Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
