Topic quoting itself displays reply indicator


(Joshua Rosenfeld) #1

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.


(Jeff Atwood) #2

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


(Michael Brown) #3

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:


(Sam Saffron) #4

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


(Sam Saffron) #5

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


(Michael Brown) #7

(Jeff Atwood) #8

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.


(Jeff Atwood) #9

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.


(Sam Saffron) #10

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


(Jeff Atwood) #11

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


(Jeff Atwood) #12

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.

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


(Jeff Atwood) #13

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


(Sam Saffron) #14

Its a definite bug I want fixed, but not an urgent bug, cause you did just :shark: :gun: yourself.


(Jeff Atwood) #15

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.


(Régis Hanol) #16

And might :boom: the database if you click the Select +replies button :astonished:

EDIT: it’s now fixed :fire_engine:


(Jeff Atwood) #19

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


(Régis Hanol) #20

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


(Jeff Atwood) #22

@Osama can you take this one?


#23

Fixed in:


(Jeff Atwood) #24