Multisite comment embedding confusion


(Ken) #1

I have a multisite web-only discourse container, with several sites discourse_a, discourse_b, etc, each with their own separate fqdn.

I’ve been using comment embedding on one static blog (call it blog A) without issue for a little while - topics are created on discourse_a and the embedded comments show up fine on Blog A.

Now I am trying to set the same thing up for Blog B. Discourse_b is working by itself, and has all the same embedding settings as discourse_a (with embedding host and topic feed pointing to Blog B of course). Blog B is the same kind of static site (Pelican), with an identical javascript embedding code block - but Blog B topics are not being created, and the iframe just sits there with “Loading discussion”.

There are no errors in discourse_b/logs, and looking in the nginx logs inside the discourse container, I see:

==> nginx/access.log <==
[04/Jan/2016:22:04:20 +0000] 172.17.42.1 "GET /embed/comments?embed_url=https%3A%2F%2Fblog_b.com%2Fpost-one.html HTTP/1.0" "Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0" "embed/comments" 200 3523 "https://blog_b.com/post-one.html" 0.045 0.045 "Ace"
[04/Jan/2016:22:04:45 +0000] 172.17.42.1 "POST /message-bus/fc7d878148174c068e6200e4f2adef7b/poll?dlp=t HTTP/1.0" "Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0" "-" 200 470 "https://discourse_b.com/admin" 0.010 0.013 "-"

The embedded code keeps polling like this indefinitely, getting status 200, but never creating a topic. I am not sure where else to look.

Any ideas for further debugging would be appreciated. I’ve checked that all the urls involved are valid and working, inspected the generated html in firebug, and compared Blog A and Blog B minutely without seeing any difference in how the embed js is called. I am not sure where to go from here.

Thanks for reading.


(Jeff Atwood) #2

Any ideas here @eviltrout?


(Ken) #3

I don’t know if it’s relevant, but I’ve also been trying to sort out my http/s situation. Both blogs/discourse sites mentioned above have the same setup, an nginx reverse proxy running on my host (not in a container) handles https requests (all requests are redirected to the https), then proxies through to the docker container via a local port and plain http.

Both discourse fqdns are subdomains of the main blog domain - discourse.blog_a.com is the discourse site for blog_a.com. Both discourse.blog_a.com and blog_a.com share an ssl cert, same goes for discourse_b and blog_b.

This setup is causing me headaches with oauth redirect urls, and I would suspect it here, too, except that one site works and the other doesn’t. Maybe an avenue for investigation, though? I’m calling everything with https, and all https urls are valid and working.

Thanks for your time, I realize I have a lot of moving parts here.


(Ken) #4

Progress: I turned off the feed option for embedding, and that seems to have fixed the issue of topic creation. The primary obvious difference in the feeds of the two sites I am working with is that the one that didn’t work has an audio tag and some (escaped) javascript in the article body (<summary type="html"> tag). Something about that seems to have tripped discourse up.