Blog

MigrationWTF: Specified key was too long; max key length is 3072 bytes

I recently hit a curveball with a custom migration to import location data into Drupal. I am helping a family friend merge their bespoke application into Drupal. Part of the application involves managing Locations. Locations have a parent location, so I used taxonomy terms to harness the relationship capabilities. Importing levels one, two, three, and four worked great! Then, all the sudden, when I began to import levels five and six I ran into an error: Specified key was too long; max key length is 3072 bytes

Using JSON API to query your Search API indexes

The JSON API module is becoming wildly popular for in Drupal 8 as an out of the box way to provide an API server. Why? Because it implements the {json:api} specification. It’s still a RESTful interface, but the specification just helps bring an open standard for how data should be represented and requests should be constructed. The JSON API module exposes collection routes, which allows retrieving multiple resources in a single request.

Implementing a Checkout Flow resolver in Drupal Commerce 2.0

CheckoutResolverInterface.php

What are we going to learn?

Drupal Commerce 2 allows you to support multiple checkout forms. This is pretty cool because it allows you to have different checkout experiences for your customers based on what they are purchasing. We're going to dive into why you would want to use a checkout flow resolver and how to implement one.

  • Understand the order and checkout relationship
  • Implement a checkout flow resolver service

Drupal 8 Development Cookbook - Second Edition

During DrupalCon Vienna, the second edition of the Drupal 8 Development Cookbook was published! The Drupal 8 Development Cookbook published just over a year ago, right after Drupal 8.1 was released. I had written the book for 8.0 with "just in case" notes for what might change in Drupal 8.1. What I was not prepared for: how well the minor release system worked and provided rapid gains in feature changes.

Migrated: Now on Drupal 8!

My personal site is now officially migrated onto Drupal 8! I had first attempted a migration of my site back when Drupal 8.0 was released but had a few issues. With Drupal 8.3 it was nearly flawless (maybe even 8.2, but I had put the idea back burner.) I did have some interesting issues to workaround

Missing filter plugins

My migration process was halted and littered with errors due to missing plugins, specifically around my text formats. The culprits were:

DrupalVM and CircleCI: Deploying for the wins

DrupalVM is a tool created by Jeff Geerling that “makes building local Drupal development environments quick and easy” for Drupal. It is built using Vagrant and provisioned with Ansible. Since it uses Ansible, it also provides a means to support a production environment deployment. This allows for a repeatable and determinable environment when developing and deploying to remote servers.

Setup Drupal Commerce for CI and Behat testing

I can proudly say that we have been on top of our test coverage in Drupal Commerce. Back in June of 2016 we had removed any trace of Simpletest based tests and moved over to PHPUnit Unit, Kernel, Functional, and FunctionalJavascript tests. Once using PhantomJS for JavaScript testing landed in core we jumped ship. Test coverage is great for the individual project because we can ensure that we ship an (assumedly, mostly) bug-free product. But I believe we should do more than that.