Handling HTML Markup with Drupal's Migrate API
summary
Migrations switch from brittle regex to a DOM-based pipeline: PHP DOMDocument + XPath parses HTML reliably, and Migrate Plus now includes a Dom process plugin to import/export DOM objects, a dom_string_replace for attribute-level replacements, dom_apply_styles to map external formatting into CKEditor styles, and a migration lookup plugin that rewrites in-text links to new entity IDs. These plugins come from an Isovera/Pega project, appear in current Migrate Plus releases, and are used in live demos.
AI-written summary · about
chapters (8)
- 0:00Introduction and setup
- 2:13Migrate API overview
- 6:12HTML parsing with regex
- 18:35DOM parsing for HTML
- 27:22DOM in Migrate API
- 31:57New process plugins
- 40:00Future improvements
- 41:26Q&A
related talks
55mDrupal 8 Migrate: Taming the wild west and learning new tricks
45mMigrate all the things!
33mMigrating data to Drupal 8
22mIT news portal migrated from a highly customized Wordpress to Drupal 8
41mWhat’s New in Drupal 8?
01h 02mRewriting 12-Year-Old Code
36mUsing migrations and fixtures
44m"Switch your extension’s documentation to the new PHP-based rendering"
