# Embed comments : TypeError: Attempting to register an unknown factory: \`site-settings:main\`

**URL:** <https://meta.discourse.org/t/embed-comments-typeerror-attempting-to-register-an-unknown-factory-site-settings-main/50624>\
**Category:** Product Support\
**Created:** [2016 年9 月 25 日 09:01 UTC](https://meta.discourse.org/t/embed-comments-typeerror-attempting-to-register-an-unknown-factory-site-settings-main/50624 "2016-09-25T09:01:51Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![Chopper](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chopper/32/57073_2.png) [@Chopper](https://meta.discourse.org/u/Chopper)\
发布日期： [2016 年9 月 25 日 09:01 UTC](https://meta.discourse.org/t/embed-comments-typeerror-attempting-to-register-an-unknown-factory-site-settings-main/50624/1 "2016-09-25T09:01:51Z")

</div>

I try to embed comments into an external website but i always get this error :

![](https://global.discourse-cdn.com/meta/original/3X/9/8/986111474326c4d50dde88d17cc889bc43cf2e46.png)

And in the log i get this two errors :

 ![](https://global.discourse-cdn.com/meta/original/3X/3/c/3c7a7734233b42d722f01a717e5feb50e00f16ff.png) 

```
Uncaught TypeError: Attempting to register an unknown factory: `site-settings:main`
Url: https://forum.teambac.fr/assets/ember_jquery94d39baf2b7a346571d3472782c3994e23b7cf8c4e2c645075bc11f7a82cdccf.js
Line: 4
Column: 5819
Window Location: https://forum.teambac.fr/embed/comments?embed_url=https%3A%2F%2Fwww.teambac.fr%2Fevent%2F518

```

I can see in the log **Job exception: 404 Not Found**

And backtrace log :

```
/usr/local/lib/ruby/2.3.0/open-uri.rb:359:in `open_http'
/usr/local/lib/ruby/2.3.0/open-uri.rb:737:in `buffer_open'
/usr/local/lib/ruby/2.3.0/open-uri.rb:212:in `block in open_loop'
/usr/local/lib/ruby/2.3.0/open-uri.rb:210:in `catch'
/usr/local/lib/ruby/2.3.0/open-uri.rb:210:in `open_loop'
/usr/local/lib/ruby/2.3.0/open-uri.rb:151:in `open_uri'
/var/www/discourse/lib/freedom_patches/open_uri_redirections.rb:70:in `open_uri'
/usr/local/lib/ruby/2.3.0/open-uri.rb:717:in `open'
/usr/local/lib/ruby/2.3.0/open-uri.rb:35:in `open'
/var/www/discourse/app/models/topic_embed.rb:84:in `find_remote'
/var/www/discourse/app/models/topic_embed.rb:138:in `import_remote'
/var/www/discourse/lib/topic_retriever.rb:56:in `fetch_http'
/var/www/discourse/lib/topic_retriever.rb:43:in `perform_retrieve'
/var/www/discourse/lib/topic_retriever.rb:10:in `retrieve'
/var/www/discourse/app/jobs/regular/retrieve_topic.rb:16:in `execute'
/var/www/discourse/app/jobs/base.rb:154:in `block (2 levels) in perform'

```

And the env log :

```
hostname	vps-app
process_id	[94, 93]
application_version	[fa6b10cf3ce84d21861a50519f5d5ffa7201bcc4, 999f52954f698841cd02f012557d101783143efa]
current_db	default
current_hostname	forum.teambac.fr
job	Jobs::RetrieveTopic
problem_db	default
opts	null
user_id	[2, 329]
embed_url	[https://www.teambac.fr/event/518, https://www.teambac.fr/event/486]
referer	[https://www.teambac.fr/event/518, https://www.teambac.fr/event/486]
current_site_id	default 

```

 ![](https://global.discourse-cdn.com/meta/original/3X/6/2/622d0462cbcd861310beb09e3a9bb73b57a4edc3.png)

And this is the code used to embed :

```javascript
    <div id='discourse-comments'></div>

    <script type="text/javascript">
      DiscourseEmbed = { discourseUrl: 'https://forum.teambac.fr/',
                         discourseEmbedUrl: window.location };

      (function() {
        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>

```

---

_[View the full topic](https://meta.discourse.org/t/embed-comments-typeerror-attempting-to-register-an-unknown-factory-site-settings-main/50624)._
