Content moderation
Content Moderation is a Drupal core module that gives content states such as Draft, Published and Archived and limits who may move it between them.
Content Moderation lets a Drupal site put content through review before it goes live. It ties a workflow to revisionable content entities, such as nodes, block content and taxonomy terms, so the state of each saved version decides whether it is published. A live page keeps running while a new version waits for approval.
How Content Moderation works in Drupal 11
The module depends on the core Workflows module. Workflows defines workflows as configuration: states and the transitions between them. Content Moderation supplies the workflow type that attaches such a workflow to content entity types and bundles. Core ships specific moderation handlers for nodes, block content and taxonomy terms; other revisionable content entity types use a generic handler.
On a site installed with the Standard profile, enabling the module also creates an Editorial workflow. The workflow is not applied to anything yet. At Configuration › Workflow › Workflows, edit it and choose the content types it applies to.
A moderated edit form shows Current state and a Change to selector for existing content, or Save as for new content. Each state carries two flags: whether content in it is published, and whether it becomes the default revision. When you save, the module forces a new revision and sets the published status from the state. Core also denies edits to the Published field of moderated items, and the bulk Publish and Unpublish actions do nothing on them.
Access is permission based. Every transition gets a permission titled like "Editorial workflow: Use Publish transition". Two more permissions come with the module: View any unpublished content and View the latest version. The Moderated content page at /admin/content/moderated lists content in an unpublished state, such as Draft or Archived.
Example
The Editorial workflow from the Standard profile has three states:
| State | Published | Default revision |
|---|---|---|
| Draft | No | No |
| Published | Yes | Yes |
| Archived | No | Yes |
Its transitions are Create New Draft, Publish, Archive, Restore to Draft and Restore. An author saves a change as Draft. The live page stays as it was, because a draft is not the default revision. An editor with the Publish transition permission opens the item, changes it to Published, and the draft becomes live.
Common mistakes
- Forgetting to assign content types. Enabling the module and the workflow changes nothing until a type is selected.
- Missing view permissions. Authors need View the latest version and View own unpublished content to see their latest changes.
- Adding a Needs review state carelessly. The Drupal.org documentation warns that published content becomes inaccessible if that transition may start from Published, or if the state is a default revision. Leave both off.
- Unpublishing with the checkbox. On moderated types you archive the item with a transition.
For marketing and content teams
Content Moderation turns "who may publish" from a habit into a rule. Writers can save drafts without risking the live page, and an editor approves the change. Agree on your states and which role owns each transition before the site builder sets it up. See editorial workflow for the process side.
Sources
- Drupal.org: Content Moderation overview
- Drupal.org: Workflows module
- Content Moderation module definition, Drupal core source (11.4.x)
- Content Moderation permissions, Drupal core source (11.4.x)
- Editorial workflow of the Standard profile, Drupal core source (11.4.x)
- ModerationHandler, Drupal core source (11.4.x)
- ContentModerationHooks, Drupal core source (11.4.x)
- ModerationStateWidget, Drupal core source (11.4.x)
- Moderated content view, Drupal core source (11.4.x)
- ContentModeration workflow type, Drupal API