Paragraphs conversion and recovery¶
Follow the conversion tutorial. Enable
compound_field_paragraphs and check eligibility before converting:
drush compound-field:paragraphs-preflight node.field_sessions --strip-field-prefix --yaml
drush compound-field:paragraphs-convert node.field_sessions \
--compound-id=conference_session --strip-field-prefix --dry-run
Omit the preflight field name to inspect all fields. Preflight checks configuration; the conversion dry run also checks stored values.
Eligibility and history¶
The field must contain one paragraph type with finite sub-field caps and compatible field types and names. Outer cardinality can remain unlimited. Resolve concerns about sharing, unpublished content, translated revisions and unused revisions. Acknowledgment does not bypass refusals.
Each host revision receives values from its referenced paragraph revision. Compound items have no paragraph ID, UUID, publication state or independent history. Unused paragraph revisions have no destination. Translations require a matching host language and translatable field. Keep Paragraphs for mixed types, behavior plugins or pieces needing independent entity behavior.
Conversion rebuilds the field under the same name across every bundle sharing its storage. Review widget settings, Views relationships and other dependent configuration afterward.
Command options¶
| Option | Purpose |
|---|---|
--compound-id |
Unused compound ID; defaults to the field name without field_. |
--strip-field-prefix |
Convert field_title to title. Use consistently across checks and execution. |
--dry-run |
Check without writing. |
--acknowledge |
Accept the destructive rebuild; -y also answers confirmation. |
--chunk-size |
Rows per batch. |
--capture-dir |
Export affected configuration; also works with --status and --abandon. |
--status |
Show progress and recovery information. |
--abandon --acknowledge |
Forget the conversion record after recovery; restores nothing. |
Recover configuration¶
Back up the database, export configuration and stop writers and cron before converting. Capture configuration in a private, empty directory outside the webroot and configuration sync directory. Retrieve it after an interruption:
drush compound-field:paragraphs-convert node.field_sessions --status \
--capture-dir=/private/backups/conference-paragraphs
Adapt deleted objects before restoring. Compare repaired objects with live
configuration; leave untouched objects alone. A name-only capture requires the
earlier export. Captures contain old paragraph references, so do not import the
whole directory. --capture-dir-holds-other-config bypasses directory checks,
including for configuration sync, risking obsolete settings on the next import.
Resume or restore¶
Inspect --status, fix the cause and rerun the original command. Only one
process converts a field, including staging. A killed worker retains its lease
for up to ten minutes after its last progress; then a rerun resumes from the
saved cursor and discards unfinished chunk rows. Some copy stages restart.
If verification repeatedly fails, restore the pre-conversion database backup.
Keep every table named by --status until recovery finishes. Remaining source
paragraphs do not restore host references; successful verification removes
temporary staging, and restoring host references may require the backup.
After manual recovery, export recovery information before using
--abandon --acknowledge. It removes only the conversion record, leaving content,
configuration and recovery tables intact.
Remove old paragraphs¶
After verifying content, historical revisions and dependent configuration:
drush compound-field:paragraphs-cleanup node.field_sessions --dry-run
drush compound-field:paragraphs-cleanup node.field_sessions --acknowledge
Cleanup permanently deletes orphaned source paragraphs. Keep a backup.
Use --bundle to restrict it to one paragraph type.