I'm trying to utilize discourse in order to provide embedded discussions for an existing web site. The urls of the existing site are not fliexible and I'm trying to work around restrictions on discourse for topic length. For testing I have the following web page at 'http://localhost:6543/cases/88'. I'm using a hosted site and have correctly setup the DNS alias to redirect back to the discourse subdomain. I've added 'localhost:6543' to my discourse site with a default category( which already exists) and am using the following javascript in my html page:
<script type="text/javascript">
$(function()
{
var DiscourseEmbed = { discourseUrl: 'http://citadel-discussion.lexmachina.com/',
discourseEmbedUrl: 'http://localhost:6543/cases/88' };
var d = document.createElement('script');
d.type = 'text/javascript';
d.async = true;
d.src = DiscourseEmbed.discourseUrl + 'javascripts/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);
});
</script>
The response I get from discourse is
404 Not Found
The resource could not be found.
/cases/undefinedembed/comments
My assumption here is that the url components are not adequate for a new topic. Since I can't create any topic with the disourse admin UI that is under a certainly length.
How might I utilize this url to automatically create topics in discourse?
Must the url string in discourseEmbedUrl match the actual url of the page?
Thanks for your help.