dmytroduk / Duk.EPiServer.Disqus

Disqus integration for EPiServer based websites
Microsoft Reciprocal License
1 stars 5 forks source link

JavaScript error when Disqus not included on the page. #7

Open marisks opened 8 years ago

marisks commented 8 years ago

Error details:

Uncaught TypeError: Cannot read property 'appendChild' of null @ embed.js:17
m                                    @ embed.js:17
n                                     @ embed.js:17
h.toJSON                        @ embed.js:17
b.loadEmbed                  @ embed.js:18
(anonymous function)     @ embed.js:18

As mentioned on StackOwerflow it might be caused because of script added to the page where is no comments block:

<div id="disqus_thread"></div>

With Duk.EPiServer.Disqus package I cannot control that. Solution would be that Duk.EPiServer.Disqus would inclide script only if there is a disqus block on the page.

Camzilla commented 8 years ago

Edit: Found pull requst!

dmytroduk commented 7 years ago

Could you please describe how to reproduce this problem on Episerver-based website?

Camzilla commented 7 years ago

@dmytroduk Creating a page without embedding discus on it.. The title of the ticket even specifies the problem.

dawid-madzia commented 7 years ago

@dmytroduk are you going to merge the fix? I've noticed the same problem as described here in one of the sites I'm working with.