Drupal

Building a custom migration in Drupal 8, Part 6: Custom Source Plugins

 
In the last post, we went beyond simple node migrations and leveraged the power of the Drupal 8 migration system to break up and reorganize our content into Paragraphs. We created a separate migration for each source field we wanted to convert into a paragraph entity, and then an additional migration that created nodes using the paragraphs. We used psudofields and some creative use of plugins to migrate things just the way we wanted. It sounds like we've handled everything, but we can still go further.

Building a custom migration in Drupal 8, Part 5: Paragraphs

 
In the last post, we migrated our uploaded images and attachments by creating a custom file migration. We explored the process section of our migration *.yml, and enhanced it with custom mappings. We leveraged Drupal 8's powerful process plugin system to even further customize our migrations. We found out we could chain migrations together through the migration_lookup plugin. Finally, we created and ran a simple node migration. So that's it, right? Series over? Heck no! In this part,

Building a custom migration in Drupal 8, Part 4: Files and Content

 
In the last post, we finally wrote and executed our first migrations. We performed a dependency mapping to determine we needed to first migrate roles, then our users. We created new migrations in *.yml directly by searching our Drupal core directory for useful migration_templates. We're four parts in, and we have yet to migrate any nodes! Argh! Can we just start migrating nodes already!? File migrations It's really tempting at this point to jump in and start writing a migration for some of your...

Building a custom migration in Drupal 8, Part 3: Users and Roles

 
In the last post, we laid the technical foundation necessary to create migrations. We installed the Migrate Plus and Migrate Tools modules to support our migrations. We imported our Drupal 7 database locally, and configured settings.php with connection credentials. Finally, we created a migration group to use those connection credentials. But we still haven't migrated any content as of yet. Let's change that. Where to start? Now that we're ready to start creating custom migrations, we...

Building a custom migration in Drupal 8, Part 2: Tools and Modules

 
In the last post we set the stage to build a custom migration in Drupal 8. We installed Drupal 8 locally, and performed some initial, basic configuration. We didn’t get very far in technical tasks, but we spent a lot of time revisiting and rethinking our previous design choices. At this point you should have an idea of how you want your new site to work. Work, not look. We’re interested in functional details, content types, organizational strategies, that sort of thing. Visual appearance is a...

Building a custom migration in Drupal 8, Part 1: Getting started

 
Unlike previous versions, there’s no real way to “upgrade” to Drupal 8. Instead, you set up a completely new Drupal 8 site, then migrate your existing site to your new one. Given a database connection and a files directory, this auto-generated migration can attempt to replicate your entire site. This is great, but it also replicates all your previous design decisions, mistakes, and cruft. Instead, you may want to see moving to Drupal 8 as an opportunity to revisit previous decisions and...

Why I wasn't at BADCamp last weekend

 
You may have noticed I wasn't at Bay Area Drupal Camp last weekend. If you were following the camp closely or my social media account, you might have expected otherwise. When the accepted sessions were announced, my talk "Ride the Whale: Docker for Drupalists" was on the list. Then, a week before the camp, it was nowhere to be found on the schedule. What happened was a combination of unexpected circumstances and the relentless progression of the hourglass. An unexpected acceptance First of all, I...

A few things I've learned in the issue queue

 
“Big bang patches” are great -- at sprints When I started working on contrib modules, I often identified a broad-sweeping issue with the module and then worked on it with a single issue and a big patch. These patches were often tens of kilobytes in size and changed a lot of the module. This actually is more efficient in an admittedly limited number of circumstances. If you’re have a very busy schedule, the time it takes to break up large changes into smaller and smaller issues seems like a...

Drupalcorn and Humor in Presenting

 
Yesterday I gave a talk at Drupalcorn about my work porting Flag module. All in all, it went pretty well.  I spent about two weeks of evenings and weekends to put together the slides. When I started writing the session, I was expecting it to be very code heavy, but it quickly became apparent that wouldn't work. Code is most expressive when you have it all in front of you. It's least expressive in the constrained setting of a presentation. You really can't expect your audience to absorb much of...

The State of #flagOnD8

 
For over a year now I've been working on porting Flag module to Drupal 8. We've come a long, long way. Possibly the Oldest Drupal 8 Contrib Project Around I started working on the module when I realized I was facing a "Reverse Sisyphus" problem in contributing to Drupal 8 directly. Instead of pushing the boulder up the hill and having it roll back down again, Drupal 8 already had a lot of momentum behind it. Each time I tried to contribute, I had to chase it down the hill in the hope that maybe...