roblib/node_media_unpublish

Adds action to unpublish nodes and all associated media.

Maintainers

Package info

git.library.upei.ca/astanley/node_media_unpublish

Type:drupal-custom-module

pkg:composer/roblib/node_media_unpublish

Transparency log

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

dev-main 2026-08-25 15:27 UTC

This package is not auto-updated.

Last update: 2026-08-26 01:03:00 UTC


README

Provides a Drupal 10/11 node action named Unpublish node and associated media.

When the action is executed for a node, it:

  1. Unpublishes the node if it is currently published.
  2. Finds media entities where field_media_of references the node.
  3. Unpublishes each published media entity the current user is allowed to update.

Installation

Copy the module to web/modules/custom/node_media_unpublish, then enable it:

drush en node_media_unpublish -y
drush cr

The module installs a configured system action automatically, so it can be used from Drupal's node bulk operations/action UI.

Caution

Will unpublish the associated media, even if media is associated with multiple nodes.