Moderation Note

Enables inline text annotations on moderated content entities for editorial collaboration and feedback.

moderation_note
644 sites
54
drupal.org

Overview

The Moderation Note module provides a powerful annotation system for Drupal's Content Moderation workflow. It allows editors and reviewers to select specific text within entity fields and attach notes directly to those selections, creating a context-aware feedback system.

When viewing the latest revision of a moderated entity, users with appropriate permissions can highlight text in supported field types and add notes with optional assignees. Notes appear as yellow highlights on the content, with tooltips for easy viewing. The module supports threaded conversations through replies, allowing collaborative discussions directly on the content.

Notes can be resolved when feedback has been addressed, with the ability to re-open them if needed. The module integrates with Drupal's toolbar to show users their assigned notes count, and adds a "View Notes" tab to moderated entities displaying the total note count.

Email notifications keep stakeholders informed when notes are created, assigned, resolved, re-opened, or replied to. The module also provides Views integration for building custom note management interfaces.

Features

  • Inline text selection annotation - select text within entity fields and attach notes directly to the highlighted content
  • Note assignment system - assign notes to specific users who have permission to access moderation notes
  • Threaded conversations - reply to existing notes to facilitate collaborative discussions
  • Note lifecycle management - resolve notes when feedback is addressed, re-open if needed, or permanently delete
  • Email notifications - automatic emails sent when notes are created, assigned, resolved, re-opened, or replied to
  • Toolbar integration - displays count of assigned notes in the admin toolbar for quick access
  • Local task integration - adds "View Notes" tab to moderated entities showing total active note count
  • Multilingual support - notes are tied to specific language translations, enabling concurrent review across languages
  • Views integration - exposes moderation note data for custom Views with relationship to notated content
  • Supported field types: text, text_long, text_with_summary, string, string_long, entity_reference, entity_reference_revisions, boolean, datetime, list_string
  • AJAX-powered interface - create, edit, reply, resolve, and delete notes without page reloads using off-canvas dialogs
  • Quick Edit compatibility - moderation notes are hidden during Quick Edit sessions and restored after saving

Use Cases

Editorial Review Workflow

Content reviewers can select specific passages in draft content and add notes requesting changes or asking questions. The content author receives email notifications and sees highlighted areas requiring attention. Once changes are made, the reviewer can resolve the note. This creates a clear audit trail of the review process.

Multi-reviewer Collaboration

Multiple editors can add notes to the same content simultaneously. Each note can be assigned to a specific team member responsible for addressing that feedback. The toolbar shows each user their assigned note count, making it easy to track outstanding tasks.

Translation Review

When content is translated, reviewers can add notes to specific language versions independently. This allows concurrent review of translations without interference, as notes are tied to the content's language code.

Client Feedback Collection

For agencies, client users can be given note creation permission without edit access. Clients can highlight text and add feedback notes, which the content team can then address. The resolve/re-open workflow tracks which feedback items have been handled.

Content QA Process

Quality assurance teams can use notes to flag issues during content audits. Views integration allows building dashboards showing all open notes across the site, filterable by assignee, content type, or creation date.

Tips

  • Grant 'view latest version' permission to note users so they can access draft content being reviewed
  • Use the 'resolve moderation notes on editable entities' permission to allow content owners to manage notes on their content
  • Customize email notifications by overriding templates/mail-moderation-note.html.twig in your theme
  • Build custom note management views using the provided Views integration to track notes across your site
  • Notes support newlines - press Enter in the note text to create multi-line feedback

Technical Details

Admin Pages 1
Moderation Note settings /admin/config/moderation-note

Configure global settings for the Moderation Note module, including email notification preferences.

Permissions 7
Access Moderation Notes

Allows users to view moderation notes on content they have access to view. This is the basic permission required to see highlighted notes and access the note sidebar.

Create Moderation Note

Allows users to create new moderation notes on moderated content. Users can select text and add annotations.

Create Moderation Note if unable to edit content

Allows users to create notes even on content they cannot edit. Useful for reviewers who need to provide feedback without edit access.

Reply to moderation note

Allows users to reply to existing moderation notes without full note creation permission. Enables participation in note discussions.

Resolve Moderation Note

Allows users to resolve (close) their own moderation notes when feedback has been addressed.

Resolve Moderation Note if able to edit content

Allows users to resolve any note on content they can edit, not just their own notes. Useful for content owners managing feedback.

Administer Moderation Notes

Full administrative access to all moderation notes. Can view, create, edit, delete, and resolve any note regardless of ownership. This is a restricted permission.

Hooks 2
hook_moderation_note_insert

Triggered when a new moderation note is created. Used internally to send email notifications and invalidate cache tags.

hook_moderation_note_update

Triggered when a moderation note is updated. Used internally to handle assignee changes and publishing status changes for notifications.

Troubleshooting 5
Notes not appearing on content

Ensure the entity type has Content Moderation enabled, you are viewing the latest revision, the user has 'access moderation notes' permission, and the field type is one of the supported types (text, string, entity_reference, etc.).

Cannot create notes on content

Verify the user has 'create moderation notes' permission. If they cannot edit the content, they also need 'create moderation notes on uneditable entities' permission.

Email notifications not being sent

Check that email sending is enabled at /admin/config/moderation-note. Also verify your site's mail system is properly configured and the recipient users have valid email addresses.

Notes showing on wrong text

This can happen if content is significantly modified after notes are created. The module uses fuzzy matching to find text, but large changes may cause misalignment. In such cases, the quote context is displayed in the note to clarify what was originally selected.

Assigned notes not showing in toolbar

Ensure the user can access the toolbar and has 'access moderation notes' permission. The toolbar link only appears for users with this permission.

Security Notes 4
  • The 'administer moderation notes' permission grants full access to all notes and should be restricted to trusted administrators
  • Note text is stored as plain text and displayed with basic sanitization - avoid allowing untrusted users to create notes if XSS is a concern
  • Email notifications include note content - be aware that sensitive feedback may be sent via email
  • The assignee autocomplete only shows users with 'access moderation notes' permission to prevent information disclosure