A day doesn't go by that someone isn't asking a question in Slack #migration about how to troubleshoot a specific problem with a tricky migration. Almost universally, these problems be demystified by using Xdebug and putting breakpoints in two spots in Core's MigrateExecutable
. First is in the ::import()
method where it rewinds the source and then processes it. The second place I regularly put a breakpoint is in ::processRow
(). Or if I already know which process plugin is breaking, I might put a breakpoint in it directly. For example, the sub_process
or migration_lookup
process plugins tend to be complicated and a common place for me to drop a breakpoint.
Try it out. Put some breakpoints in these places. See how a row of data is processed. You'll learn a lot and the mystery of migrations will disappear.
Are you looking for help with a Drupal migration or upgrade? Regardless of the site or data complexity, MTech can help you move from a proprietary CMS or upgrade to the latest version–Drupal 8.
Write us about your project, and we’ll get back to you within 48 hours.