New topics are not created in embedded discourse



Hi all,

I am having hard time trying to embed discourse comments into existing rails application. My setup is apache + passenger handling my existing app, working behind haproxy which also routes requests to discourse configured to be accessible in subfolder on same IP as my rails app. The app and the discourse are working just fine. However, I am not able to get embedding discourse comments following official howto.

All I get is Loading Discussion message, browser dev tools show that discourse rendered an IFRAME for insertion into the app, I see it is refreshed every 30 sec, but no topic is generated in category selected in admin panel of embedding.

Anybody succeeded in running a setup like mine and embedding comments?


BTW how do I add tag to the topic?

(Robin Ward) #3

Are both your Discourse and rails application publicly accessible? In other words can be they be reached on the public internet? Are they password protected?


No, unfortunately they are not accessible from the internet.

(Robin Ward) #5

Embedding can only work on public sites. In theory you could get it working with private networking, but that is quite difficult to make sure every site can see each other.


I need more explanation why embedding can only work on public sites. What are the limitations and requirements? Could you give some points to make embedding work, even on closed intranet? As I wrote, my discourse server and apache are both running on same system, so what could be the blocking point here?

(Robin Ward) #7

Sorry, I should clarify. You can run Discourse behind a firewall, even with embedding, but you have to be very sure that:

  • Both applications can see each other
  • The user browsing the applications can see both

I said “public” because that’s how the feature is designed. But if the above are both 100% true then it should work.



good general directions to follow, now I have to think off how to implement them :slight_smile: I am 99,98% sure that every user can browse both applications. So 50% check!

However, 1st point: both apps can see each other. This one involves docker magic and nginx kung-fu. Any suggestions, anybody?


I have tried to analyze my problem, but I am stuck. Sidekiq log is flooded with many requests triggered by embbeding script from page that should have embedded discourse topic created. Hovewer, it is not happening due to failure of sidekiq job, every time with same reason

Jobs::HandledExceptionWrapper: Wrapped OpenURI::HTTPError: 504 Gateway Timeout

I don’t know how to check reason of this connectivity error.