Error embedding Discourse

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: Test embed - Grow with Jane
My configuration

1 Like

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

1 Like

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.

1 Like

It works with posts and pages.

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

1 Like

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.


1 Like

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


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

1 Like

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