Suppresses Drupal status, warning, and error messages whose text matches configured patterns. Useful for hiding persistent test-mode notices, CI/CD log noise, and chatty third-party module warnings that clutter screenshots, training videos, and on-call dashboards.

What it does

Filters $variables['message_list'] at hook_preprocess_status_messages() against an admin-configured list of patterns (substring or PHP regex). Matched messages are removed before the status messages template renders. Suppression is purely cosmetic; the underlying cause of any message is not addressed.

Key features

  • Substring match (case-insensitive, default) or PHP regex with delimiters
  • Optional logging of suppressed messages to the error_squelch channel for audit trails
  • Drush commands for managing patterns from the CLI: drush error-squelch:list / add / remove (aliases esl / esa / esrm)
  • Test mode injects a known status message visible only to users with the Administer Error Squelch permission, so operators can verify the filter is working before deploying patterns to production
  • Modern Drupal patterns: OO hooks via #[Hook], #config_target throughout the form, Drush 12+ command layout

When to use it

Reduce noise from known-benign messages while a proper fix is pending: a payment gateway's hardcoded "running in test mode" notice, missing-file warnings during an in-progress media sync, chatty contrib modules with unhelpful defaults. Not a substitute for fixing the underlying issue; the suppressed message is gone but the condition that triggered it isn't.

Requirements

  • Drupal 10.3 or later, or Drupal 11
  • No additional modules required
  • Drush 11 or later (optional, only for the CLI commands)

What's next

Error Squelch is now covered by the Drupal Security Advisory policy.
Vulnerability reports go to security@drupal.org; see
the
Drupal Security Team procedures
for the disclosure process. Do not
report security issues through the public issue queue.

No further behavioural changes are planned for the 1.0.x line; future
work will track Drupal core compatibility and any reported bugs.

Supporting organizations: 
Sponsor

Project information

Releases