Support » Plugin: Disqus Comment System » [Plugin: Disqus Comment System] Minor bug in Javascript code

  • Minor bug in version 2.61 can be found on lines 1051 and 1080 of disqus.php file, which is an unterminated “else” statement (no semicolon).

    Fix:

    Starting line 1046 and 1076 (duplicate code):

    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]; // <-- NOT TERMINATED IN ORIGINAL
      nodes[i].parentNode.href = url + '#disqus_thread';
    }

    It can cause issues with some JS minifiers, as with certain WordPress caches.

    http://wordpress.org/extend/plugins/disqus-comment-system/

  • The topic ‘[Plugin: Disqus Comment System] Minor bug in Javascript code’ is closed to new replies.