Board Thread:Support Requests - Getting Technical/@comment-26009167-20150223134640/@comment-452-20150223153951

Odd, I use importArticles for my chat scripts. I just tested it in the Chat here, and it works fine... just not with your example.

The error "Cannot read property 'appendChild' of undefined" is a problem with the scripts you're loading, not a problem with importArticles.

edit: after some testing, the problem is in "ChatObject", and moving it to the end fixes the problem.

importArticles({   type: 'script',    articles: [        'u:dev:ChatOptions/code.js',        'u:dev:ChatTags/code.js',        'u:dev:ChatObject/code.js'    ] });

edit: I've also looked at ChatObject/code.js and identified that the problem is indeed in that script.

In the diff you linked, the next revision actually has ChatOptions before ChatObject - which is why the error doesn't happen there.

Having importScriptPage("ChatObject/code.js", "dev"); first also causes the error.