DISQUS

Community Page on DISQUS

what is this?

DISQUS Blog

The official Disqus forum. This is the place to receive beta support and offer suggestions.
« Back
Author

The black sheep "num_posts"

Started by digitarald · 6 months ago

I did not found the old thread about this problem so I open a new one.

The response for a thread with get_posts holds a property "num_posts" ... which contains NOT the total amount of posts but the amount of posts in the response, the weird result:

http://digitarald.de/project/fancyupload/?page=... : Comments 26 – 44 of 19

I hope that nobody reads that numbers.

Another problem with get_num_posts), both numbers are wrong because they include removed comments. So I have a project-comment-header that says 44 comments, but there are not 44 visible comments because I removed some.

And another one:
http://disqus.com/api/v1/get_posts/?forum_url=d...
No per_page parameter, still num_posts is 26, default per_page (from documentation) is 25.

I hope that helps your development progress.

15 comments

  • get_num_posts should correctly display the number of posts. For http://digitarald.de/project/fancyupload/, I am seeing 73. num_posts for get_posts is incorrect. I will take a look at this.
  • I see also 73 BUT count 53 visible comments ... as I said, get_num_posts seems to include deleted posts and that is incorrect too (like the JS error that is still on that page because of disqus and its voting-js). thx for looking into this.
  • I counted 73 posts here: http://digitarald-de.disqus.com/fancyupload_swi..., which is the thread which it is connected to. Are you seeing killed posts within?
  • I forgot the 3rd and 4th page :( , seems the pagination calculation is borked (possibly because of the wrong num_posts in the response ;) ). Sorry for the inconvenience.
  • The num_posts value should return the number of posts being returned for that API call. The reason is because you may have less than per_page posts returned if there are less posts. There is also a case where more posts may be returned, which isn't a documented case. If there is a long threaded conversation, by default the entire conversation is returned so that pagination does return posts in the middle of a nested conversation. You may override this behavior by passing "overflow_orphan=1" to the get_posts API call.

    You can call get_num_posts in the meantime to get the correct total number of posts in the entire thread. Would you prefer that the total number of posts also be included in the response for get_posts?
  • total number of posts in get_posts: That would be expected behaviour for me.
  • Hello. I was trying to find a way to contact a Disqus tech person directly but haven't found any link. I hope it is ok to post it here.

    Can comments be turned off at a blog post level?

    I have a writing project that is supposed to accept entries up to July 26. The entries are now being submitted through the Disqus comment system. However, after July 26, I have to turn off the comments for that specific post as it shouldn't accept anymore. Is this possible in Disqus? With blogger.com, comments can be turned off at a post level which I did for the writing project last year. I realized that I didn't check if this is possible at all in Disqus prior to my conversion.

    Kindly advise. Thank you.
  • Yes, you can lock threads from your dashboard: disqus.com/dashboard
  • Too sad, development on disqus stopped?
  • It most definitely hasn't.

    Sometimes it may take more than 2 days for us to address something you bring up, but thank you for being patient. We'll take a look.
  • Ok, Daniel, 2 days are over ... still I can't get the total num_posts in get_posts.

    I'm sad.
  • Oops, I lost track of this. We haven't gotten to this yet. I'll bring it up.
  • Any progress, so I can fix my comment system?
  • APIs are updated next week. Sorry for the wait
  • like, now?

Add New Comment

Returning? Login