12
Squarespace Drupal a migration adventure Joe Chellman shooflydesign.org @shooflydesign

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

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

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

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

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

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 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

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

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

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

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

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

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

fin.questions?