[wp-trac] [WordPress Trac] #63931: Deleting a parent comment causes the child to move up a level
WordPress Trac
noreply at wordpress.org
Wed Sep 10 23:50:11 UTC 2025
#63931: Deleting a parent comment causes the child to move up a level
---------------------------------------+-----------------------------
Reporter: oglekler | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Comments | Version:
Severity: normal | Resolution:
Keywords: has-test-info 2nd-opinion | Focuses:
---------------------------------------+-----------------------------
Comment (by SirLouen):
Replying to [comment:9 peterwilsoncc]:
> I don't think WordPress can delete/trash the entire comment tree because
that is very unlikely to meet the user's intent when removing a single
comment. A plugin may wish to do so using the existing `trash_comment` or
`delete_comment` actions.
I don't really know each single expected behavior in WP, but its funny
because I always thought it worked this way. The reality is that generally
I lock comments (And I was thinking on integrating bbPress with comments
in some of my sites in the future, which can has this all-or-nothing
parent-child structure).
Leaving childs without a parent, means, leaving comments without a
context, which can't make any sense for anyone. I wonder who could say:
"Yeah, leave the comments without context". Like the example in the OP.
Someone says something, someone answers to it, parent is removed, and the
answer without the context, can make the author look stupid for having
wrote that. Webmasters will not be accounting for this disorder because
they cannot really see it. So we cannot really fully see what is the
intent of an administrator, removing a single comment without having the
whole context.
In a hierarchized structure like the parent-child comment relationship, a
child is always a reply to a comment. I used Reddit because is the most
famous parent-child comment system in the planet, something like a
placeholder is an expected behaviour and they use the placeholder system.
With youtube is different: if you remove the parent comment all childs are
automatically removed, also a potential expected behaviour.
But leaving childs without parent is a defective behaviour. There should
be some degree of accounting for this in core by default, not entirely
relying in plugins to fixed (specially if we really plan to fully support
a quality comments component, obviously), and maybe write a `dev-note`
with the conclusion on how this will be “officially” handled for the
version that is planned to be released.
Personally, I think, that how it's being handled is not a real design
decision but just mere chance by how currently other hierarchical post
types are handling the parent-child relationship (like Pages). But pages
are not of the same nature of comments. Comments hierarchy is always a
dependency, not an exception. Pages hierarchy can be of multiple uses.
There can be a massive relationship, like some sort of inheritance or a
fragile relationship, like just an organizational structure (for example,
all the items starting with A). In the case of comments, again, the
relationship is always, indistinctly, massively correlated (answer-reply).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63931#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list