Skip to content

Convert a Custom Field session record

The converter rebuilds a Custom Field host field as a compound under the same machine name. It maps supported columns to Drupal field types. Widget settings may need reconfiguration.

Prepare and inspect

For this example, create unlimited field_sessions on Conference with string columns title and room. Save Opening keynote in Main hall. The conversion covers every bundle using node.field_sessions. Choose an unused compound ID.

drush en compound_field_custom_field -y
drush compound-field:custom-field-preflight node.field_sessions --compound-id=conference_session
drush compound-field:custom-field-convert node.field_sessions --compound-id=conference_session --dry-run

Review mappings and resolve all refusals. Acknowledgment cannot bypass them.

Rebuild the field

Back up the database and stop content writers and cron. Conversion deletes and recreates storage; the field temporarily reads as empty. Cron could purge retained source tables before recovery decisions finish.

Choose a private writable capture directory outside the webroot and config sync:

drush compound-field:custom-field-convert node.field_sessions \
  --compound-id=conference_session \
  --capture-dir=/private/backups/conference-custom-field \
  --acknowledge -y

Verify and restore dependent configuration

Converted compound inputs.

Check Manage fields, saved values and rendering. The field keeps its machine name, outer deltas and mapped values. The compound label comes from the host field. Configure widgets and formatters; repair Views and other consumers listed in the dependent configuration report. Review captured exports before reimporting old references.

Conversion copies current and revision rows with their language coordinates, then verifies through the field API. Rehearse translations, pending drafts and custom hooks on your site.

Keep Custom Field installed until source-table purge completes. Resume cron only after verifying the result and backup. If interrupted, inspect the record:

drush compound-field:custom-field-convert node.field_sessions --status

Rerun the conversion to resume. Keep recovery tables and records while deciding how to recover. See the conversion and recovery guide.