Layout Builder Audit
This module provides a visual audit trail for Drupal's Layout Builder, tracking every block change, including additions, modifications, moves, and deletions. It highlights field-level differences and allows users to see who made which layout adjustments.
Layout Builder Audit is a powerful, visual audit trail for Drupal's core Layout Builder. It is designed to answer the age-old content management question: "Who changed this page, and what exactly did they do?"
While Drupal core tracks node revisions, it does not provide granular visibility into exactly which blocks were added, modified, moved, or deleted within the Layout Builder interface. This module bridges that gap by providing a beautiful, timeline-based UI directly on your nodes to track every single layout action.
✨ Key Features
- Granular Action Tracking: Automatically tracks and logs every block creation, modification, movement (region changes), and deletion.
- Visual Field Diffs: When a user edits a block, the audit log breaks down the exact field-level changes (e.g., text edits, setting changes) in a clean, side-by-side "Before vs After" table.
- Ghost Save Detection: Intelligently detects when a user opens and saves a block without making actual field modifications, logging the save but clearly tagging that no visible content changed.
- Beautiful, Modern UI: Features a timeline-based user interface directly integrated into a new "Layout Audit" tab on your nodes. Events are grouped cleanly by date with interactive accordions to reduce clutter.
- Comprehensive Metadata: Logs the user (with UID), timestamp, IP address, block UUID, block plugin ID, and specific region transitions.
- Advanced Filtering: Easily filter the audit log by specific event types (Created, Modified, Moved, Deleted) to find exactly what you're looking for, complete with pagination for heavy editorial sites.
- Performance Optimized: Uses custom database tables and handles serialized block configurations efficiently to ensure no performance hit to your editorial experience.
📖 How it Works
Once installed, the module works silently in the background. Every time a content editor uses the Layout Builder interface to manage blocks on a node, Layout Builder Audit intercepts those actions and logs the exact configuration changes into a custom database table.
To view the audit trail:
- Navigate to any node that has Layout Builder enabled.
- Click the Layout Audit tab (located next to the standard "Layout" and "Edit" tabs).
- Browse the interactive timeline of changes!
📦 Installation
Install the module via Composer to ensure all dependencies (if any are added in the future) are managed correctly:
composer require 'drupal/layout_builder_audit:^1.0'Enable the module via Drush (or via the Extend UI):
drush en layout_builder_audit
💡 Requirements
- Drupal 10 or higher.
- The core Layout Builder module must be enabled.