Drupal is a registered trademark of Dries Buytaert

druidfire

232 sites Security covered
View on drupal.org

Druidfire (Drush Instant Delivery FIeld REsizer) is a powerful developer tool that enables dynamic field transformations in Drupal sites. It provides a "spell" plugin system for modifying field schemas.

Druidfire was originally written by chx.

Features

Druidfire offers unique functionality for advanced field transformations that would otherwise require complex database operations and configuration changes:

Field Resizing: Dynamically resize text and string fields to adjust maximum character limits without losing data or requiring site rebuilds.

Field Type Conversions: Convert between different field types seamlessly:

  • Transform plain string fields to formatted text fields (with WYSIWYG support)
  • Convert Entity Reference Revisions fields to standard Entity Reference fields
  • Convert Entity Reference Revisions fields to Bricks fields for advanced layout building
  • Transform string fields into taxonomy term reference fields

Safe Schema Operations: All transformations handle database schema changes, configuration updates, and cache clearing automatically to ensure data integrity.

Drush Integration: Execute field transformations via Drush commands for automated deployments and bulk operations.

This module is essential when you need to modify existing field types on production sites, migrate content between field types, or perform bulk field transformations during site updates without data loss.

Post-Installation

After enabling Druidfire, no configuration interface exists -- this is a developer-focused tool used programmatically or via Drush commands.

Via Drush Commands:

# Show all available Druidfire spells and what they do
drush druidfire:list-spells

# Resize a field to 1024 characters
drush druidfire:resize paragraph section_title 1024

# Convert string field to formatted text
drush druidfire:string2formatted node body

# Convert Entity Reference Revisions to Entity Reference
drush druidfire:err2er node my_field

# Convert ERR to Bricks field
drush druidfire:err2bricks node my_paragraphs_field

# Convert string field to taxonomy reference (requires vocabulary ID)
drush druidfire:string2taxonomyreference node category tags

Via PHP Code (in update hooks or custom code):

// Resize a field with specific property
\Drupal::service('druidfire')->resize('paragraph', 'link', ['size' => 1024, 'property' => 'title']);

// Convert string to formatted text
\Drupal::service('druidfire')->string2formatted('paragraph', 'component_flora_answer');

// Convert to bricks field
\Drupal::service('druidfire')->err2bricks('paragraph', 'paragraph_unlimited');

// Convert Entity Reference Revisions to Entity Reference
\Drupal::service('druidfire')->err2er('paragraph', 'component_lee_referenced_item');

// Convert string to taxonomy reference
\Drupal::service('druidfire')->string2taxonomyReference('node', 'time', ['vid' => 'event_time']);

All operations automatically handle schema changes, configuration updates, and cache clearing. Always backup your database before running field transformations.

Additional Requirements

Core Requirements:

  • Drupal 10+ or Drupal 11+
  • Drush (for command-line operations)

Optional Dependencies (depending on transformations used):

  • Bricks module: Required for err2bricks spell (Entity Reference Revisions to Bricks conversion)
  • Paragraphs module: Typically needed when working with Entity Reference Revisions fields
  • Taxonomy module: Required for string2taxonomyReference spell (included in Drupal core)

The module works with standard Drupal field types and doesn't require external libraries or APIs.

Similar projects

Field Tools: Provides some field manipulation capabilities but focuses on field cloning rather than type conversion. Druidfire differs by offering deep schema transformations and automated configuration updates.

Structure Sync: Handles content structure synchronization but doesn't provide dynamic field type conversions. Druidfire specializes in live field transformations that Structure Sync cannot perform.

Configuration Update Manager: Manages configuration changes but lacks the specialized field transformation capabilities that Druidfire provides through its spell system.

Druidfire is unique in its approach of using a "spell" architecture that encapsulates complex field transformation logic into reusable, testable components.

Supporting this Module

Contributions and improvements are welcome through the standard Drupal.org issue queue and patch process.

Community Documentation

For additional guidance:

  • Review the module's README.md file for basic usage examples
  • Examine the spell classes in src/Spells for implementation details
  • Test transformations in development environments before production use
  • Consult Drupal API documentation for understanding field storage and configuration systems

Important Safety Note: Always create full database backups before running field transformations, as these operations modify both database schemas and configuration files irreversibly.

Activity

Total releases
2
First release
Sep 2025
Latest release
5 months ago
Release cadence
0 days
Stability
50% stable

Releases

Version Type Release date
1.0.0 Stable Sep 26, 2025
1.0.x-dev Dev Sep 26, 2025