# Topic quoting itself displays reply indicator

**URL:** https://meta.discourse.org/t/topic-quoting-itself-displays-reply-indicator/76085
**Category:** Bug
**Created:** [14. Dezember 2017 um 22:24 UTC](https://meta.discourse.org/t/topic-quoting-itself-displays-reply-indicator/76085 "2017-12-14T22:24:47Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [14. Dezember 2017 um 22:24 UTC](https://meta.discourse.org/t/topic-quoting-itself-displays-reply-indicator/76085/1 "2017-12-14T22:24:47Z")

</div>

If a topic quotes itself, the “1 reply” indicator is displayed despite there being no replies, even if the quote is removed during the 5 minute edit window.

---

<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: [14. Dezember 2017 um 22:37 UTC](https://meta.discourse.org/t/topic-quoting-itself-displays-reply-indicator/76085/2 "2017-12-14T22:37:24Z")

</div>

Do you mean when a post quotes itself, or is this limited to the first post in the topic? What are the repro steps?

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [14. Dezember 2017 um 22:39 UTC](https://meta.discourse.org/t/topic-quoting-itself-displays-reply-indicator/76085/3 "2017-12-14T22:39:04Z")

</div>

Two things going on here:

If Post A quotes Post B, A becomes a Reply of B (even if A==B or A came before B)

If the quote is later removed, A remains a Reply of B.

EDIT:

> [@supermathie](#):
>
> Two things going on here

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [14. Dezember 2017 um 22:42 UTC](https://meta.discourse.org/t/topic-quoting-itself-displays-reply-indicator/76085/4 "2017-12-14T22:42:42Z")

</div>

I am a bug … I just quoted myself… click 1 reply it is me

> [@supermathie](#):
>
> I am a bug..

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [14. Dezember 2017 um 22:43 UTC](https://meta.discourse.org/t/topic-quoting-itself-displays-reply-indicator/76085/5 "2017-12-14T22:43:27Z")

</div>

I am another bug, I quoted myself and removed the quote.. click (1 reply) it is me. Deleting should have cleared it.

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [14. Dezember 2017 um 22:44 UTC](https://meta.discourse.org/t/topic-quoting-itself-displays-reply-indicator/76085/7 "2017-12-14T22:44:51Z")

</div>

[https://try.discourse.org/t/this-is-a-test-post/923](https://try.discourse.org/t/this-is-a-test-post/923)

---

<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: [14. Dezember 2017 um 22:47 UTC](https://meta.discourse.org/t/topic-quoting-itself-displays-reply-indicator/76085/8 "2017-12-14T22:47:32Z")

</div>

Try posts are only valid for between 1 and 24 hours.. until the DB is reset .. so better to repro it here in this topic.

---

<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: [14. Dezember 2017 um 22:48 UTC](https://meta.discourse.org/t/topic-quoting-itself-displays-reply-indicator/76085/9 "2017-12-14T22:48:49Z")

</div>

> [@sam](#):
>
> Deleting should have cleared it.

That’s kind of a feature request, really, since I’m sure we have always behaved that way. Also I’d kinda put that behavior in the “don’t do that” category?

Feels a bit feature-creep-y to complain that a “problem” we’ve had since 2013 is real urgent and must fix now.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [14. Dezember 2017 um 22:49 UTC](https://meta.discourse.org/t/topic-quoting-itself-displays-reply-indicator/76085/10 "2017-12-14T22:49:21Z")

</div>

> [@codinghorror](#):
>
> had since 2013 is real urgent and must fix now.

I don’t see either of these as urgent to fix. You shot yourself in the foot here.

---

<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: [14. Dezember 2017 um 22:49 UTC](https://meta.discourse.org/t/topic-quoting-itself-displays-reply-indicator/76085/11 "2017-12-14T22:49:56Z")

</div>

I’m pretty sure _deleting_ a reply works fine, so this is only in the bizarre quote removal scenario.

---

<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: [14. Dezember 2017 um 22:50 UTC](https://meta.discourse.org/t/topic-quoting-itself-displays-reply-indicator/76085/12 "2017-12-14T22:50:40Z")

</div>

Also I am more worried about

> post quoting itself increments reply counter on _.. itself?_

and I think this bug report is really kind of all over the place and I don’t like it for that reason.

> [@codinghorror](#):
>
> and I think this bug report is really kind of all over the place and I don’t like it for that reason.

This is me quoting myself in my own post.. via the magic of edits.

---

<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: [14. Dezember 2017 um 22:52 UTC](https://meta.discourse.org/t/topic-quoting-itself-displays-reply-indicator/76085/13 "2017-12-14T22:52:28Z")

</div>

> [@codinghorror](#):
>
> This is me quoting myself in my own post… via the magic of edits.

Yes THIS is the scenario we should fix @supermathie I do not care _AT ALL_ about the quote removal issue. But **a post quoting itself should not increment that post’s reply counter** , and thus attach a copy of itself to.. itself.. when you expand the replies at the bottom. That I do feel strongly about. cc @sam

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [14. Dezember 2017 um 22:56 UTC](https://meta.discourse.org/t/topic-quoting-itself-displays-reply-indicator/76085/14 "2017-12-14T22:56:10Z")

</div>

Its a definite bug I want fixed, but not an urgent bug, cause you did just 🦈 🔫 yourself.

---

<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: [14. Dezember 2017 um 22:59 UTC](https://meta.discourse.org/t/topic-quoting-itself-displays-reply-indicator/76085/15 "2017-12-14T22:59:13Z")

</div>

Seems easy though, logic being, at the time of save:

- if the quote is for the current post
- skip attaching formal reply metadata in db

I agree it is a strange scenario.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [14. Dezember 2017 um 23:01 UTC](https://meta.discourse.org/t/topic-quoting-itself-displays-reply-indicator/76085/16 "2017-12-14T23:01:57Z")

</div>

And might 💥 the database if you click the Select +replies button 😲

_EDIT: it’s now fixed_ 🚒

[https://github.com/discourse/discourse/commit/092c976d7c00cc2483b5cf363a0cbfa3aeb09737](https://github.com/discourse/discourse/commit/092c976d7c00cc2483b5cf363a0cbfa3aeb09737)

---

<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: [14. Dezember 2017 um 23:57 UTC](https://meta.discourse.org/t/topic-quoting-itself-displays-reply-indicator/76085/19 "2017-12-14T23:57:27Z")

</div>

@zogstrip this is good but we still need to fix the “on save” logic so it basically ignores self-quotes of the current post?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [15. Dezember 2017 um 00:00 UTC](https://meta.discourse.org/t/topic-quoting-itself-displays-reply-indicator/76085/20 "2017-12-15T00:00:37Z")

</div>

Yes, I just fixed the “get the replies” code to not loop indefinitely in these cases. Will fix the other part tomorrow.

---

<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: [9. Juli 2018 um 22:19 UTC](https://meta.discourse.org/t/topic-quoting-itself-displays-reply-indicator/76085/22 "2018-07-09T22:19:20Z")

</div>

> [@codinghorror](#):
>
> we still need to fix the “on save” logic so it basically ignores self-quotes of the current post?

@Osama can you take this one?

---

<div class="post-metadata">

### Author: ![Osama](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osama/32/98013_2.png) [@Osama](https://meta.discourse.org/u/Osama)
#### Post date: [10. Juli 2018 um 05:47 UTC](https://meta.discourse.org/t/topic-quoting-itself-displays-reply-indicator/76085/23 "2018-07-10T05:47:09Z")

</div>

Fixed in:

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

---

<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: [10. Juli 2018 um 05:56 UTC](https://meta.discourse.org/t/topic-quoting-itself-displays-reply-indicator/76085/24 "2018-07-10T05:56:16Z")

</div>


