# Embed: reply count is off by one

**URL:** https://meta.discourse.org/t/embed-reply-count-is-off-by-one/27998
**Category:** Bug
**Created:** [April 27, 2015, 2:48pm UTC](https://meta.discourse.org/t/embed-reply-count-is-off-by-one/27998 "2015-04-27T14:48:46Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![probus](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@probus](https://meta.discourse.org/u/probus)
#### Post date: [April 27, 2015, 2:48pm UTC](https://meta.discourse.org/t/embed-reply-count-is-off-by-one/27998/1 "2015-04-27T14:48:46Z")

</div>

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).

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [April 27, 2015, 3:57pm UTC](https://meta.discourse.org/t/embed-reply-count-is-off-by-one/27998/2 "2015-04-27T15:57:10Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [April 28, 2015, 1:41am UTC](https://meta.discourse.org/t/embed-reply-count-is-off-by-one/27998/3 "2015-04-28T01:41:30Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![probus](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@probus](https://meta.discourse.org/u/probus)
#### Post date: [April 28, 2015, 5:24am UTC](https://meta.discourse.org/t/embed-reply-count-is-off-by-one/27998/4 "2015-04-28T05:24:08Z")

</div>

Embedded comments are Discourse topics embedded in an iframe as comments for a static website. See for example: [Where Are The High Resolution Displays?](http://blog.codinghorror.com/where-are-the-high-resolution-displays/)

 ![](https://global.discourse-cdn.com/meta/original/3X/3/8/38533c782d9d53cc75872d666611d59553c3da0b.png) 

 ![](https://global.discourse-cdn.com/meta/original/3X/6/1/6167dfa105bd111f02e9b6ef80c22dca2b54191e.png) 

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”

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [April 28, 2015, 5:30am UTC](https://meta.discourse.org/t/embed-reply-count-is-off-by-one/27998/5 "2015-04-28T05:30:16Z")

</div>

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

---

<div class="post-metadata">

### Author: ![probus](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@probus](https://meta.discourse.org/u/probus)
#### Post date: [April 28, 2015, 9:00am UTC](https://meta.discourse.org/t/embed-reply-count-is-off-by-one/27998/6 "2015-04-28T09:00:58Z")

</div>

> [@Mittineague](#):
>
> Does the topic have any Deleted posts that might be throwing the count off?

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

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [May 11, 2015, 8:29am UTC](https://meta.discourse.org/t/embed-reply-count-is-off-by-one/27998/7 "2015-05-11T08:29:57Z")

</div>

Thanks for reporting it @probus! Fixed 🐜

[https://github.com/discourse/discourse/pull/3450](https://github.com/discourse/discourse/pull/3450)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [May 11, 2015, 8:30am UTC](https://meta.discourse.org/t/embed-reply-count-is-off-by-one/27998/8 "2015-05-11T08:30:46Z")

</div>


