Uncaught type error: Cannot call method 'split' of undefined
-
I’m getting this error in Google Chrome dev tools. It shows up in this code:
var disqus_shortname = '<?php echo strtolower(get_option('disqus_forum_url')); ?>'; (function () { var nodes = document.getElementsByTagName('span'); for (var i = 0, url; i < nodes.length; i++) { if (nodes[i].className.indexOf('dsq-postid') != -1) { nodes[i].parentNode.setAttribute('data-disqus-identifier', nodes[i].getAttribute('rel')); url = nodes[i].parentNode.href.split('#', 1); if (url.length == 1) { url = url[0]; } else { url = url[1]; } nodes[i].parentNode.href = url + '#disqus_thread'; } } var s = document.createElement('script'); s.async = true; s.type = 'text/javascript'; s.src = '//' + '<?php echo DISQUS_DOMAIN; ?>/forums/' + disqus_shortname + '/count.js'; (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s); }());
I tried using the option that puts Javascript in the footer since it seems like some people fixed their errors that way, but it still shows up.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Uncaught type error: Cannot call method 'split' of undefined’ is closed to new replies.