We have a bunch of existing assets we want to hang Talk comments on. Rather than relying on a canonical URL, I thought we could use the existing asset IDs (guid) and then we would not have to worry about future changes to URLs or having to do our own mapping between our IDs and Talk's asset IDs. After reading https://docs.coralproject.net/talk/integrating/asset-management/ I think the best way to describe what I expected was to continue using Talk's "Lazy Asset Creation" but just use my provided asset ID instead of Talk creating a new one. So I changed my onload handler to look like this:
Coral.Talk.render(document.getElementById('coral_talk_stream'), {
talk: '<talk URL>',
asset_id: '3915bc66-9e75-e811-a369-b4ae2bc935cd',
asset_url: '<my web page URL>/3915bc66-9e75-e811-a369-b4ae2bc935cd',
auth_token: <token>
})
I did not do any of the other Overriding a Resolver/Creating a New Asset Route/Creating an Asset UpdateRoute steps described in the docs, because I really want the existing lazy asset creation behavior.
When my page loads, the spinner just spins forever. There are no errors on the console or in the notification popups.
If I remove asset_url, the same thing happens.
If I remove asset_id, and keep asset_url, then everything loads just fine.
Set up Talk 4.5 with a web page that supplies its own asset_id in the Coral.Talk.render() call.
Talk version 4.5.0, deployed via Docker
You should install and use https://github.com/coralproject/talk-plugin-custom-asset-id plugin which will enable the behavior you're looking for 馃槃
Great, that works perfectly! Thanks for the quick response!
Maybe worth a mention in the official docs.
Sorry, not sure if I should open a new issue or comment here as it is perfectly relevant to this thread:
I am having the same issue but I have installed the plugin which I can see in the node_modules folder inside the talk docker container installation. When I test this locally, I get a "Graph QL: error: Internal Error" popup at the bottom of the viewport and then a spinning waiter in the blank comment div. My code looks like this:
Coral.Talk.render(document.getElementById('coral_talk_stream'), {
talk: '<talk url>',
lazy: true,
asset_id: '92ae9e52-1fdf-11e7-a7a3-001851cded07'
});
I have tried it with and without asset_url. If I comment out asset_id it works fine. Is it possible the plugin is not working or in inactive?
I've replied on the new issue. Keeping this closed as the new issue is a different issue.
Most helpful comment
You should install and use https://github.com/coralproject/talk-plugin-custom-asset-id plugin which will enable the behavior you're looking for 馃槃