Embed: reply count is off by one


(probus) #1

Count for how many more replies there are in the topic is off by one in embedded comments.

Say the comment topic has the opening post + 7 comments and you configure embed to show only 5 comments. It will tell the users (correctly) that there are 7 replies, show five of them (correctly) and then tell there are 3 more replies in the forum (incorrect).


(Michael Downey) #2

What are “embedded comments” and where can I look to see this reply count?

Perhaps you can provide some detailed steps to reproduce this bug?


(Jeff Atwood) #3

Probably related to Sam’s change to switch from Posts (count includes first post) to replies (count does not include first post). Might be an easy fix @techapj you can check to see if counts are off on codinghorror embedding.


(probus) #4

Embedded comments are Discourse topics embedded in an iframe as comments for a static website. See for example: Where Are The High Resolution Displays?

I’m guessing codinghorror blog has the default limit of 100 embedded comments (since I don’t care to count…), so that should be “12 more replies”


(Mittineague) #5

Does the topic have any Deleted posts that might be throwing the count off?


(probus) #6

Obviously I can’t say for codinghorror blog, but no, deleted posts don’t matter. It is off by one every time.


(Arpit Jalan) #7

Thanks for reporting it @probus! Fixed :ant:

https://github.com/discourse/discourse/pull/3450


(Jeff Atwood) #8