Talk: Not able add embed script to my local page

Created on 6 Sep 2018  路  5Comments  路  Source: coralproject/talk

Do you want to request a feature or report a bug?

bug

Intended outcome:


added the embed script to my page

Actual outcome:


showing graphql error: Internal error

How to reproduce the issue:


follow this https://docs.coralproject.net/talk

Version and environment

v4.5.1

troubleshooting help

Most helpful comment

@hminaeeBrunswicknews Thanks for the reply. The issue is solved. One thing to notice is that the docs here https://docs.coralproject.net/talk say that the domain where you embedding the script should to added in permitted domains list. But if you see the code here https://github.com/coralproject/talk/search?q=canonical&unscoped_q=canonical then it is looking into the canonical link and that domain should be added to permitted domains list. documentation should be improve a lot.

All 5 comments

@deepaksisodiya I am new to talk as well but this happened to me and after white listing the page url in which I added the script to, the problem was resolved. It worth's giving it a try :)

@hminaeeBrunswicknews Thanks for the reply. The issue is solved. One thing to notice is that the docs here https://docs.coralproject.net/talk say that the domain where you embedding the script should to added in permitted domains list. But if you see the code here https://github.com/coralproject/talk/search?q=canonical&unscoped_q=canonical then it is looking into the canonical link and that domain should be added to permitted domains list. documentation should be improve a lot.

@deepaksisodiya I am having the same exact issue, but only on a certain network. Did you figure out what the problem was?

@striedinger Can you please explain more on this so that I can help.

In order to Talk to work, we need to add the domain URL to permitted domain list here http://127.0.0.1:3000/admin/configure/tech in case of local.
And when Talk script runs on your page then it looks

first
config.asset_url;

if not found then, caninical link
document.querySelector('link[rel="canonical"]').href;

if not found then
window.location.origin + window.location.pathname;

as coded here https://github.com/coralproject/talk/blob/f2857a8085b8f3b4757ad7a93698d0b90ce28824/client/coral-embed/src/index.js

So In my case, I did not add the canonical link URL to permitted domain list and after adding that URL to permitted domain list it starts working.

@deepaksisodiya My issue turned out to be exactly what you mentioned, Talk gets the url from the canonical link, in my case somehow it was different than the real url which was the one I whitelisted.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

honzie picture honzie  路  4Comments

cristiandean picture cristiandean  路  5Comments

hminaeeBrunswicknews picture hminaeeBrunswicknews  路  4Comments

SSO
deepaksisodiya picture deepaksisodiya  路  4Comments

jvert picture jvert  路  4Comments