Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: Video.js (HTML5 Video Player) 10.0.0-alpha1 First alpha version released for module videojs (10.0.0-alpha1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Replicate Actions

460 sites Security covered Drupal 10–11
View on drupal.org

This module extends the Replicate UI functionality by automatically unpublishing replicated entities and setting the current user as the owner. It also redirects users to the edit form after replication and, if the Group module is enabled, copies group memberships for nodes.

While Replicating Nodes using Replicate API and Replicate UI modules, I found that the module will publish a node immediately (shows "view" mode) after replication.
What I would like is for when the replicated a node opens in edit mode so that a content manager can make the necessary changes before publishing it. Otherwise, it creates too many steps for them to go through.

For now, the module makes replicated entities unpublished and makes a redirect to edit mode.

Also, if the Group module is installed, this module checks whether a node has been added to a group and does exactly that.

In the future, incoming versions, I am going to add new functionality and allow doing the same for other entity types and some more actions.

This provides the extension for a simple but powerful Replicate UI.

The full list of what it module does

Unpublish replicated entities

  • Trigger: ReplicatorEvents::REPLICATE_ALTER.
  • Applies to publishable content entities that have a status field.
  • Skips:
    • Paragraph entities (paragraph).
    • Non‑reusable Layout Builder custom blocks (block_content that are not reusable).
  • For all translations:
    • Sets status to unpublished.
    • Resets created/changed timestamps to the current time (when supported).
  • Implementation: src/EventSubscriber/ReplicateSetUnpublished.php (service: replicate_actions.replicate_entity_unpublish).

Set the owner of the replicated entity to the current user

  • Trigger: ReplicatorEvents::REPLICATE_ALTER.
  • For each translation, if the entity supports ownership (setOwnerId), sets the owner to the logged‑in user.
  • Implementation: src/EventSubscriber/ReplicateSetAuthor.php (service: replicate_actions.replicate_set_author).

Redirect to the edit form after replication (Replicate UI)

  • Alters the Replicate UI confirm form to redirect to the new entity’s edit form after submission.
  • Only redirects if the entity has an edit-form link template.
  • Implementation: src/Form/ReplicateFormAlter.php used via hook_form_alter() in replicate_actions.module (service: replicate_actions.replicate_form_alter).

Copy Group memberships for nodes (if Group module is enabled)

  • Stores the original node ID during REPLICATE_ALTER, then, after save (AFTER_SAVE), adds the cloned node to the same Groups as the original.
  • Only runs for nodes and only when the group module is installed.
  • Uses group content plugin ID group_node:{bundle} when adding the relationship.
  • Implementation: src/EventSubscriber/ReplicateNodeToGroup.php (service: replicate_actions.replicate_node_to_group).

Constraints and exclusions

  • Paragraph entities are not auto‑unpublished.
  • Non‑reusable custom blocks from Layout Builder are not auto‑unpublished.
  • Group copying applies only to nodes and requires the Group module.
  • Owner change runs only if the entity supports ownership (setOwnerId).

Files of interest

  • replicate_actions.info.yml — Declares the module; depends on replicate and replicate_ui.
  • replicate_actions.services.yml — Registers the form alter and event subscribers.
  • replicate_actions.module — Contains hook_help() and hook_form_alter().
  • Implementations under src/:
    • EventSubscriber/ReplicateSetUnpublished.php
    • EventSubscriber/ReplicateSetAuthor.php
    • EventSubscriber/ReplicateNodeToGroup.php
    • Form/ReplicateFormAlter.php

🇺🇦

This module is maintained by Ukrainian developers.

Please consider supporting Ukraine in the fight for their freedom and the safety of Europe.

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
6
Tracked since
Jun 2025
Latest release
2 months ago
Releases (12 mo)
5 ▲ from 1
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
2.0.0 Stable 10–11 Jun 26, 2026
8.x-1.10 Stable 10–11 Jun 19, 2026
8.x-1.910 Stable 10–11 Jun 19, 2026
8.x-1.9 Stable 9–11 May 12, 2026
8.x-1.8 Stable 9–11 Sep 4, 2025
8.x-1.7 Stable 9–11 Jun 18, 2025