Blog

Managing Your Drupal Project with Composer

Published on Monday 10, October 2016

Drupal Commerce was started without writing any Drupal code. Our libraries set Drupal Commerce off the island before Drupal was able to support using third party library not provided by core.

Drupal now ships without third party libraries committed, fully using Composer for managing outside dependencies. However, that does not mean the community and core developers have everything figured out, quite yet.

Explore Drupal Commerce 2 with Commerce Demo! Monday 11, July 2016 mglaman

When we talk about Drupal Commerce 2, the biggest we questions we get are not about features, but when you can start building with it. Well, the answer is and has been now! Drupal Commerce 2 has been in alpha and nearing beta. What does this mean? In alpha we might have some schema changes, requiring a reinstall of your site. Luckily Drupal 8 has that fancy new configuration management system to export your site, right?

Run \Drupal\Tests\BrowserTestBase with SQLite

Published on Monday 23, May 2016

As part of the push to deprecate SimpleTest and use PHPUnit as the test runner in Drupal 8, there is the \Drupal\Tests\BrowserTestBase class. The BrowserTestBase provides a Mink runner that tests web pages in Drupal. Unlike kernel tests, which require a database and can be run via PHPUnit as well, browser tests use your default database connection. I prefer to run my tests with SQLite as I do not need to have my Docker containers running.

The simplest solution I have found, thus far, is to check the HTTP_USER_AGRENT

Drupal Commerce and Migrate status Thursday 19, May 2016 mglaman

First Steps

Plans were made back in December 2015 to put effort into the ability to support Migrate with Drupal Commerce to speed up adoption of Drupal Commerce 2.0. Commerce Migrate for Drupal 8 will provide migrations from Drupal Commerce 1.x, Ubercart for D6, and Ubercart for D7. Ideally, this module will also support other vendors, such as Magento and WooCommerce.

Profiling Drupal Commerce with Blackfire

Published on Thursday 28, January 2016

The process of debugging can be a difficult one, and the process of troubleshooting performance even more so. Luckily there are some great tools out there to help with improving the performance of web applications. Previously I wrote about generating flamegraphs from XHProf to visual stacktraces and identify bottlenecks. Flamegraphs are very helpful, but still require you to setup XHProf, download the tools for making the flamegraph SVG, and appropriately change your code to save the XHProf data.

Drupal Commerce flamegraphs and performance.

Published on Friday 25, September 2015

 I've been working on a Docker tool for local environments and one of the tools is setting up the ability to easily generate flamegraphs. I figure the best test run would be to dive into some basic info on the performance of a front page load for a typical Drupal Commerce site. There's no magic solution presented here, just some knowledge on what the build process looks depending on caches.

Fixing rotated images uploaded to Drupal from an iPhone

Published on Thursday 24, September 2015

iPhones 4 and up store images in landscape mode and use EXIF data to provide proper rotation when viewed. This is a bit quirky as not all desktop browsers provide fixes, or they may not be streamlined. I remember my old project manager telling me their images were showing up "flipped to the side" during mobile QA testing. Sure enough when the image was embedded in HTML it was cocked to the side - however when viewed directly in the browser or desktop it was fine. What?

Using Features Override to manage changes to a distribution

Published on Monday 21, September 2015

The Features module has become a de facto tool in configuration management in Drupal 7. In fact, most Drupal distributions now utilize Features to export configuration and handle updates to the configuration. There is one pitfall - Features was  meant to be a way to export a feature set. Features takes a set of configurations and its job is to ensure those are in place. That means customizations to defaults are at risk of preventing incoming changes or loss when updating. That’s not good!

Subscribe to Blog