Skip to content

Convert flat session paragraphs

Use this for fixed records. Keep Paragraphs for mixed component types, behavior plugins or independent child identities. Compound values share the host's language, revision and publication state and have no paragraph ID.

Prepare the example

Create unlimited field_sessions on Conference, allowing only Session paragraphs with single-value strings field_title and field_room. Save Opening keynote in Main hall.

drush en compound_field_paragraphs -y

Back up the database and stop content writers and cron. Conversion rebuilds host storage under its existing name and temporarily reads as empty. Every bundle using node.field_sessions is in scope.

Inspect, then convert

drush compound-field:paragraphs-preflight node.field_sessions --strip-field-prefix --compound-id=conference_session
drush compound-field:paragraphs-convert node.field_sessions --strip-field-prefix --compound-id=conference_session --dry-run

Resolve every blocker. Sub-fields need finite caps; the outer field may remain unlimited. Translations, unpublished values, sharing, behavior plugins and unused paragraph revisions can prevent unattended conversion.

--strip-field-prefix maps field_title to title and field_room to room. Keep options identical between checks and execution; the compound ID must be unused. Choose an empty private writable directory outside the webroot and config sync:

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

Check the new editing form

Converted session fields.

Check Manage fields, values, order and rendering. The compound takes its label from the host field. Conversion rebuilds display components. Review reported dependent configuration and repair Views and other consumers. Captured exports retain old references, so review them before reuse.

Each host revision receives values from its referenced paragraph revision. Separate paragraph revision history is not preserved. Review the revision policy and recovery procedure for translated or moderated sites.

Source paragraphs remain loadable. Retain them until verification. Cleanup is separate and irreversible:

drush compound-field:paragraphs-cleanup node.field_sessions --dry-run
# Only after verification, with a retained backup:
drush compound-field:paragraphs-cleanup node.field_sessions --acknowledge -y

If interrupted, run drush compound-field:paragraphs-convert node.field_sessions --status. Follow the recovery guide; rerunning conversion resumes recorded work.