Drupal is a registered trademark of Dries Buytaert
Search API Solr 4.4.0 Minor update available for module search_api_solr (4.4.0). Page Manager 8.x-4.0 Major update available for module page_manager (8.x-4.0). Trash 3.1.0-beta2 New beta version released for module trash (3.1.0-beta2). Commerce AutoSKU 3.0.1 Minor update available for module commerce_autosku (3.0.1). Custom Field 4.0.10 Minor update available for module custom_field (4.0.10). Alternative login ID & display names 2.0.12 Minor update available for module alt_login (2.0.12). EntityReference UUID 3.0.1 Minor update available for module entity_reference_uuid (3.0.1). LocalGov Publications Importer 1.1.1 Minor update available for module localgov_publications_importer (1.1.1). Configuration Override Warn 8.x-1.6 Module config_override_warn updated after 10 months of inactivity (8.x-1.6). Table Alternate Rows Module table_altrow crossed 1,000 active installs.

This module allows comments to be soft-deleted, meaning they are hidden but can be restored, while remaining in their original position in a thread with a placeholder message. This preserves the visual structure and reply chains of comment threads.

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
3
First release
Mar 2026
Latest release
1 month ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Active

Release Timeline

Releases

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