1
votes

I have a blog article hosted here that has comments hosted on Disqus. For some reason the called to count.js doesn't seem to be returning the correct number of comments. I've noticed this on a few blog entries on the same site, but oddly, not all of them... The page makes a request to http://intheatticuk.disqus.com/count-data.js?q=1&54=1,%2F2013%2F01%2F04%2Fbuilding-a-blog-using-jekyll-bootstrap-and-github-pages-a-beginners-guide%2F as you would expect, but the response is:

{
    "showReactions":true,
    "text":{
        "and":"and",
        "reactions":{
            "zero":"0 Reactions",
            "multiple":"{num} Reactions",
            "one":"1 Reaction"
        },
        "comments":{
            "zero":"0 Comments",
            "multiple":"{num} Comments",
            "one":"1 Comment"
        }
    },
    "counts":[{
        "reactions":0,
        "uid":54,
        "comments":0
    }]
}

Which is obviously where the problem lies. If you go into the discussion and wait for Disqus to load you'll see it pulls through the comments just fine, there's 9 of them... Can anyone see something glaringly obvious that I'm missing? I've tried manually changing the ID that Disqus will use to find the comment threads the several different things such as:

  1. %2Fbuilding-a-blog-using-jekyll-bootstrap-and-github-pages-a-beginners-guide%2F (so removing the date)
  2. %2Fbuilding-a-blog-using-jekyll-bootstrap-and-github-pages-a-beginners-guide
  3. building-a-blog-using-jekyll-bootstrap-and-github-pages-a-beginners-guide%2F
  4. building-a-blog-using-jekyll-bootstrap-and-github-pages-a-beginners-guide

But none of these have worked and returned the correct count either.

1

1 Answers

1
votes

Specify the absolute URL associated with that thread in your comment count href link instead of the relative url which you are currently using. The absolute URL should would be:

<a href="http://in-the-attic.com/2013/01/04/building-a-blog-using-jekyll-bootstrap-and-github-pages-a-beginners-guide/">Comments</a>

If you are still not seeing the correct count display for that particular thread, you can use an identifier:

<a href="http://in-the-attic.com/2013/01/04/building-a-blog-using-jekyll-bootstrap-and-github-pages-a-beginners-guide/" data-disqus-identifier="EXAMPLE">Comments</a>

Keep in mind that you cannot use the identifier until you have set one for that thread within the Javascript configuration variables