![Page 1: Squarespace Drupal · • Intro to Squarespace • Intro to Migrate module • Great gnashing of teeth in the face of the exported data • Intro to our friends XMLstarlet and BBEdit](https://reader033.vdocuments.site/reader033/viewer/2022053009/5f0ca5487e708231d4366fb2/html5/thumbnails/1.jpg)
Squarespace → Drupala migration adventure
Joe Chellmanshooflydesign.org
@shooflydesign
![Page 2: Squarespace Drupal · • Intro to Squarespace • Intro to Migrate module • Great gnashing of teeth in the face of the exported data • Intro to our friends XMLstarlet and BBEdit](https://reader033.vdocuments.site/reader033/viewer/2022053009/5f0ca5487e708231d4366fb2/html5/thumbnails/2.jpg)
Quick Thanks:Joseph Linaschke
ApertureExpert.comPhotoJoseph.com
![Page 3: Squarespace Drupal · • Intro to Squarespace • Intro to Migrate module • Great gnashing of teeth in the face of the exported data • Intro to our friends XMLstarlet and BBEdit](https://reader033.vdocuments.site/reader033/viewer/2022053009/5f0ca5487e708231d4366fb2/html5/thumbnails/3.jpg)
On the menu
• Intro to Squarespace
• Intro to Migrate module
• Great gnashing of teeth in the face of the exported data
• Intro to our friends XMLstarlet and BBEdit shell worksheets
• Code overview
• Running the migration via drush
![Page 5: Squarespace Drupal · • Intro to Squarespace • Intro to Migrate module • Great gnashing of teeth in the face of the exported data • Intro to our friends XMLstarlet and BBEdit](https://reader033.vdocuments.site/reader033/viewer/2022053009/5f0ca5487e708231d4366fb2/html5/thumbnails/5.jpg)
drupal.org/project/migratewww.acquia.com/blog/migrate-26-framework-changes
Migrate module
![Page 6: Squarespace Drupal · • Intro to Squarespace • Intro to Migrate module • Great gnashing of teeth in the face of the exported data • Intro to our friends XMLstarlet and BBEdit](https://reader033.vdocuments.site/reader033/viewer/2022053009/5f0ca5487e708231d4366fb2/html5/thumbnails/6.jpg)
DATA
![Page 7: Squarespace Drupal · • Intro to Squarespace • Intro to Migrate module • Great gnashing of teeth in the face of the exported data • Intro to our friends XMLstarlet and BBEdit](https://reader033.vdocuments.site/reader033/viewer/2022053009/5f0ca5487e708231d4366fb2/html5/thumbnails/7.jpg)
An XPath to remember
• User Accounts:/squarespace-‐wireframe/website-‐member-‐accounts/website-‐member-‐account
• Blog posts:/squarespace-‐wireframe/sections/section/modules/module[id='000']/content/journal-‐entry
• Blog comments:/squarespace-‐wireframe/sections/section/modules/module[id='000']/content/
journal-‐entry-‐comment
/squarespace-‐wireframe/sections/section/modules/module[id='000']/content/comment
• Blog followups:/squarespace-‐wireframe/sections/section/modules/module[id='000']/content/ journal-‐entry[boolean(parent-‐id)]
• Forum posts and comments:/squarespace-‐wireframe/sections/section/modules/module/modules/module/content/
discussion-‐post[not (parent-‐id)]
/squarespace-‐wireframe/sections/section/modules/module/modules/module/content/
discussion-‐post[boolean(parent-‐id)]
• Forum posts and comments content (?!):/squarespace-‐wireframe/sections/section/modules/module/modules/module/content/comment
![Page 8: Squarespace Drupal · • Intro to Squarespace • Intro to Migrate module • Great gnashing of teeth in the face of the exported data • Intro to our friends XMLstarlet and BBEdit](https://reader033.vdocuments.site/reader033/viewer/2022053009/5f0ca5487e708231d4366fb2/html5/thumbnails/8.jpg)
xmlstar.sourceforge.netbarebones.com/bbedit
Help from our friends:XMLstarlet + BBEdit
![Page 9: Squarespace Drupal · • Intro to Squarespace • Intro to Migrate module • Great gnashing of teeth in the face of the exported data • Intro to our friends XMLstarlet and BBEdit](https://reader033.vdocuments.site/reader033/viewer/2022053009/5f0ca5487e708231d4366fb2/html5/thumbnails/9.jpg)
CODE!(and migrate_ui)
![Page 10: Squarespace Drupal · • Intro to Squarespace • Intro to Migrate module • Great gnashing of teeth in the face of the exported data • Intro to our friends XMLstarlet and BBEdit](https://reader033.vdocuments.site/reader033/viewer/2022053009/5f0ca5487e708231d4366fb2/html5/thumbnails/10.jpg)
Special challenges
• You know, other than the lack of documentation and size of the exported data
• base64 encoding, sometimes• $row-‐>xml-‐>{'body'}['encoding'] - print_r() doesn’t always help
• Joins. O, Joins!• Tried MigrateSourceMultiList, ended up caching or doing lookups
• Sometimes manually loaded migration maps
• Can’t rollback followups
• Drupal doesn’t use UTF8mb4 — can’t store emoji
![Page 11: Squarespace Drupal · • Intro to Squarespace • Intro to Migrate module • Great gnashing of teeth in the face of the exported data • Intro to our friends XMLstarlet and BBEdit](https://reader033.vdocuments.site/reader033/viewer/2022053009/5f0ca5487e708231d4366fb2/html5/thumbnails/11.jpg)
drush
• Migrate help:drush help -‐-‐filter=migrate
• Migrate status:drush ms
• Import, with cunning use of flags:drush mi MigrationName -‐-‐limit=“900 items” -‐-‐feedback=“100 items” -‐-‐instrument
• Force a dependent migration to run:drush mi SubMigrationName -‐-‐force
• Roll back:drush mr MigrationName
• Stop a runaway/slow migration (don’t Control-C!):drush mst MigrationName
![Page 12: Squarespace Drupal · • Intro to Squarespace • Intro to Migrate module • Great gnashing of teeth in the face of the exported data • Intro to our friends XMLstarlet and BBEdit](https://reader033.vdocuments.site/reader033/viewer/2022053009/5f0ca5487e708231d4366fb2/html5/thumbnails/12.jpg)
fin.questions?