We’re trying to implement Discourse embed comments to our documentation website, and we’re facing an inconsistent error with the message “Start discussion” and “Error embedding”.
It’s not a consistent error, we couldn’t identify a pattern. There are pages rendering the comments normally, other pages, the error is present. In some browsers we see it working, others, don’t. Even in the same browser, it works for one of us and doesn’t work for others.
We’re currently on Discourse 1.9.0.beta13 - rolling back to 1.8 or upgrading to 1.19.0.beta14 (Releases · discourse/discourse · GitHub) could be a possible fix?
It’s look like your Allowed Hosts or Path Whitelist not matching the referrer URL in Discourse (in your case docs.gitlab.com and /some/pathoptional). Can you please double check the setting?
The change should be instant, right? I tried with many variations, but all fail.
.*
.*\.html\z
The interesting thing is that it fails for specific pages for specific browsers. I also checked if there’s an X-Frame-Options header that would deny the iframe, but there isn’t:
curl -I https://docs.gitlab.com
HTTP/2 200
accept-ranges: bytes
cache-control: max-age=600
content-type: text/html; charset=utf-8
expires: Mon, 06 Nov 2017 06:53:14 UTC
last-modified: Mon, 06 Nov 2017 04:23:19 GMT
vary: Origin
content-length: 13259
date: Mon, 06 Nov 2017 06:43:14 GMT
Ok, new info. I just remembered that I had previously created a test category and all topics had already been populated. I now see that some pages point to the old topics. Maybe they conflict, so we’d need to purge all old topics and the old category itself. Using .* seems to work now.
@vinothkannans seems that works now, but we’ve noticed that in some cases the iframe is stuck at “Loading discussion…”. A page reload fixes it, though. I cannot find anything related in /logs.
I deleted all old topics and then the category itself, so there shouldn’t be any problems. Could this be a cache thing?