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.
Do you mean when a post quotes itself, or is this limited to the first post in the topic? What are the repro steps?
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:
I am a bug … I just quoted myself… click 1 reply it is me
I am another bug, I quoted myself and removed the quote… click (1 reply) it is me. Deleting should have cleared it.
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.
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.
I don’t see either of these as urgent to fix. You shot yourself in the foot here.
I’m pretty sure deleting a reply works fine, so this is only in the bizarre quote removal scenario.
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.
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
Its a definite bug I want fixed, but not an urgent bug, cause you did just yourself.
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.
And might the database if you click the Select +replies button
EDIT: it’s now fixed
https://github.com/discourse/discourse/commit/092c976d7c00cc2483b5cf363a0cbfa3aeb09737
@zogstrip this is good but we still need to fix the “on save” logic so it basically ignores self-quotes of the current post?
Yes, I just fixed the “get the replies” code to not loop indefinitely in these cases. Will fix the other part tomorrow.
@Osama can you take this one?