Drupal is a registered trademark of Dries Buytaert
cms 2.1.3 Update released for Drupal core (2.1.3)! drupal 10.5.11 Update released for Drupal core (10.5.11)! drupal 11.3.11 Update released for Drupal core (11.3.11)! drupal 11.2.13 Update released for Drupal core (11.2.13)! drupal 10.6.10 Update released for Drupal core (10.6.10)! cms 2.1.2 Update released for Drupal core (2.1.2)! drupal 11.1.10 Update released for Drupal core (11.1.10)! drupal 10.5.10 Update released for Drupal core (10.5.10)! drupal 10.4.10 Update released for Drupal core (10.4.10)! drupal 11.2.12 Update released for Drupal core (11.2.12)! drupal 11.3.10 Update released for Drupal core (11.3.10)! drupal 10.6.9 Update released for Drupal core (10.6.9)! drupal 10.6.8 Update released for Drupal core (10.6.8)! drupal 11.3.9 Update released for Drupal core (11.3.9)! drupal 11.3.8 Update released for Drupal core (11.3.8)! drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)!

trash_comment

23 sites No security coverage
View on drupal.org

Trash Comment extends the Trash module to support soft-deletion of comments.

When a comment is trashed, it is not removed from the thread. Instead, it remains in place as a placeholder displaying "This comment has been deleted." — preserving the visual thread structure and keeping reply chains intact. This mirrors the behavior users know from platforms like YouTube, Reddit, or GitHub.

Features

  • Soft-delete for comments — Trashed comments are hidden from regular display but remain in the database and can be restored at any time.
  • Thread-preserving placeholders — Deleted comments stay in position, showing a neutral placeholder message so that nested replies remain visually connected.
  • Trash admin integration — Comment bundles appear in the Trash module's settings form, allowing granular control over which comment types support soft-deletion.
  • Access control — Trashed comments cannot be edited or deleted through the UI, preventing accidental modifications.
  • Trash context support — Administrators with the "view deleted entities" permission can view original comment content via the Trash overview.
  • No custom database tables — Works entirely through Drupal's entity API and Trash module hooks, keeping the architecture lean and maintainable.

Requirements

  • Trash (^3.0)
  • Comment (Drupal core)

How it works

The module replaces the default comment storage to include trashed comments in thread queries (via TrashManager::executeInTrashContext()). At render time, trashed comments are shown as anonymous placeholders through hook_preprocess_comment. No custom entities, database tables, or templates are needed.

Activity

Total releases
2
First release
Mar 2026
Latest release
2 days ago
Release cadence
93 days
Stability
50% stable

Releases

Version Type Release date
1.0.0 Stable Jun 11, 2026
1.0.0-alpha1 Pre-release Mar 10, 2026