[wp-trac] [WordPress Trac] #63931: Deleting a parent comment causes the child to move up a level

WordPress Trac noreply at wordpress.org
Sun Sep 14 21:54:22 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:17 peterwilsoncc]:
 > @SirLouen As I've said, a place holder would require preventing users
 from deleting objects from the database. This is not something WordPress
 core can do.

 Not necessarily. Placeholder can be founded in pure logic.
 Currently the comment creation and deletion logic is the following:
 1. Childs get `comment_parent` ID
 2. When you delete permanently, `comment_parent` is updated.

 Remove this logic. Keep `comment_parent` ID forever even if parent doesn't
 exist anymore.
 When writing the comments tree, if `comment_parent` does not exist, put a
 placeholder, if not, put the `comment_parent`.
 This could place placeholders not only on the first parent but in any
 parent of the tree.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63931#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list