Install

Works with Drupal: ^11.2 || ^12

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 16.42 KB
MD5: 7457dc92643eece6fab7328e04e87f71
SHA-1: a85cf2193e898f963553e2a0eef65ae356ac4fdf
SHA-256: 2253b49f97d51c26abe9099602ec3bdc84b9432bbf5ff09559b9bfec92b6a272
Download zip 24.5 KB
MD5: 0292e73733dc8be0d8bfb4e9536cabb2
SHA-1: d260e91dc856b4e734e55a6bbccc6d8287deaf67
SHA-256: aea3db7f1f63d4a9590baf90418609f4bced441bc6d126610d572634681233bf

Release notes

Compatibility:
Drupal 11.2 or later, and Drupal 12. Requires PHP 8.3+.
Tested on Drupal 11.2, 11.4 (PHP 8.4 and 8.5) and Drupal 12.0.0-beta2.
For Drupal 10.3+, use 1.0.x (1.0.9), which stays supported.

Upgrading from 1.0.x

  1. Make sure the site runs Drupal 11.2 or later.
  2. composer require 'drupal/layout_builder_block_copy:^2.0'
  3. Run drush updatedb (or visit /update.php), then clear caches.

If you already ran the repair update on 1.0.9, there's nothing more to run.

What's new in 2.0.0

  • Drupal 12 ready: no deprecated APIs. Upgrade Status reports no issues.
  • Modern code: hooks are attribute-based classes (#[Hook]), so the .module file is gone. Services and the controller use autowiring.
  • New interface: BlockCopyManagerInterface, which you can inject by class name.
  • Logging: a dedicated layout_builder_block_copy logger channel.
  • hook_layout_builder_block_copy_access() lets other modules forbid copies, for example to enforce per-region block limits. See layout_builder_block_copy.api.php.
  • README and help page.

Includes every 1.0.9 fix
- Copies of inline blocks are now cleaned up. They're saved only when the layout is saved, so Drupal tracks them and deletes them when they're removed from a layout or the page is deleted. Discarding a layout leaves nothing behind.
- Permission fix: copying an inline block creates block content, so it now requires Create and edit custom blocks, the same permission Layout Builder needs to add one. Other blocks can still be copied without it.
- Blocks whose content is missing are no longer copied. Before, they produced a broken block.
- Opening "Copy block" in a new tab now copies the block and returns to Layout Builder.
- Bundle classes: copies of block content types that use bundle classes now get their own content.
- Repair update: a database update records the missing tracking for inline blocks copied by older releases. It never deletes anything.

Breaking changes for developers (site builders aren't affected)
- Requirements: Drupal 10 and PHP below 8.3 are no longer supported.
- Manager service: layout_builder_block_copy.block_copy_manager now implements BlockCopyManagerInterface, and its constructor changed.
- Removed method: cleanupOrphanedComponent() is gone, because copies are no longer saved early.
- Exceptions: deepCloneComponent() throws BlockCopyException when an inline block's content can't be loaded.
- Hook function: layout_builder_block_copy_preprocess_block() no longer exists; the hook lives in a class.

Behavior change:
editors who lack Create and edit custom blocks can no longer copy inline blocks.

Created by: ajetiv1
Created on: 23 Oct 2026 at 15:50 UTC
Last updated: 23 Oct 2026 at 15:50 UTC
Bug fixes
New features

Other releases