Limitations:
I understand that using this embedded feature will create a new topic
I also cant add a category to the “window.DiscourseEmbed” object for auto assigning
But I would love to be able to have the embedded code create this new discussion in my
(category) english level 1 → (subcategory) standard 1.1.
Im not sure if im missing the point or if I am just straight up trying to use this embedded feature for a way more specific use case than what its designed for.
The topics should get created in the category that you set for the host. From your second screenshot, it looks like the problem is that you have setup two allowed hosts for localhost:8082, but the Path Whitelist of the first host is going to cause all topics to be published as uncategorized.
The Path Whitelist needs to be set as a path of the domain you have set in the Allowed Hosts field, so it should start with just /. Here’s a screenshot of the settings from my test site. It publishes all topics from my blog to the ‘scratch’ category:
I ran into an issue yesterday with posts being published to the uncategorized category of my site when I had set a category for the host. I think the cause of that was that I was trying to publish the topics to a protected category. I’m going to look into that some more to confirm whether or not that was the problem.
It is setup like you suggest. But it is still creating an uncategorized topic, and I would expect it to be in english Level 1 (category) -> 1.1 written text study (sub-category)
This is the URL i am using as discourseEmbedUrl: “h ttps://forum.studyit.govt.nz/c/english-level-1/1-1-written-text-study”
Im sure its my path Whitelist that is wrong, but it seems to dislike anything other than /.*
I would expect this next pic to re route everything to the 1.1 subcategory which its not:
The Path Whitelist setting should be the path to the posts that you are trying to pull into your Discourse site, not the path to where you want to publish the posts on Discourse. The way you have it setup in your second screenshot looks correct to me. I’m not sure why this would be failing to publish topics to the correct category. Do you have any security permissions set on that category? Is the group ‘everyone’ allowed to ‘Create / Reply / See’ in that category?