Drupal Planet

Protocol Relative URLs in Drupal 7

Posted: December 27, 2011 In / 2 Comments

When I first started tackling the problem of https and Drupal caching I wanted an interim solution and started by making the database caching layer smarter. Neil Drumm had the idea to use protocol-relative (a.k.a, schemeless) URLs. This turns out to be a great idea and thanks to some hooks in Drupal it's something we can implement fairly easily. Read more »

Drupal Does Not Respect https:// When Caching

Posted: December 26, 2011 In / 4 Comments

One of the problems I recently discovered with the Drupal cache is that it doesn't properly handle https transactions when caching happens. Let's take a look at understanding the problem, an interim solution for the database cache, and finding a long term solution.

The Problem

page-cache-https-issue.png Read more »

DrupalCamp Michigan Registration Re-Opened

Posted: October 17, 2011 In

DrupalCampMI-2011.pngWhen we first started planning DrupalCamp Michigan we didn't have high expectations for turnout. Southeast Michigan, where the camp is being held, is not known for a large or active Drupal community. When we sold out less than 3 weeks after we had the idea for the camp it was a very present surprise. But, we knew there were more people who wanted to come and an opportunity to reach more people. So, we've added more space and re-opened registration.

Special thanks to Jason Savino for jumping all over this, coordinating with others in the local community (especially Mike O'Connor from the Commerce Guys who was also working on this), and making the extra space happen quickly. Read more »

The First DrupalCamp Michigan

Posted: October 3, 2011 In / 2 Comments

DrupalCampMI-2011.pngThis December 3rd will be the very first DrupalCamp Michigan. Our initial go at a DrupalCamp will be a one day event at the Crowne Plaza in Novi. The event is being sponsored and attended by the local Drupal shops of Commerce Guys, Mustardseed Media, Switchback, and Commercial Progression.

If you're interested in attending head on over to http://drupalcampmi.org for more details and to register. Space is limited. Read more »

The Drupal Community and Front End Performance

Posted: September 20, 2011 In / 9 Comments

Drupal has a presence problem when it comes to front end performance. Drupal has for the most part ignored front end performance. According to a study by Strangeloop, 97% of the time it takes a mobile page to render is in the front end. For desktop browser the front end makes up 85% of the time. These numbers may feel high. But, when pages take 500ms to render in Drupal but 6 seconds to display in an end users browser you can see where this comes from. Read more »

SplFixedArray, An Underutilized PHP Gem

Posted: September 8, 2011 In / 2 Comments

Arrays in PHP are not arrays per the typical array data type. Instead, as Matt Butcher recently pointed out arrays in PHP are similar to hashes in other languages. This can be a very important point to know when tracking down bugs in code and to programmers coming to PHP from other languages. But, what if we wanted something like a traditional array data type? Maybe something that preserved numeric order. Enter SplFixedArray. Read more »

JavaScript Theme Functions in Drupal

Posted: May 16, 2011 In / 5 Comments

Drupal has an extensive theming system which includes theme functions that can be overridden and an extensible template system. There is an expectation that all markup go through the theme system and it is considered a bug when that doesn't happen. Most of the talk surrounding this system focuses on the server side system and what we can do in PHP. But, that's not all there is to the theme system. Drupal provides a theme system for JavaScript as well. One with callbacks that can be overridden by themes, just like on the PHP side. Read more »

Translatable Strings In Drupal JavaScript

Posted: May 2, 2011 In / 1 Comment

Drupal is known for being highly translatable. The localization team has done a fantastic job building out tools to make Drupal translatable and it's rare to find a module that doesn't properly wrap its strings in the t() function or the lesser known format_plural() function. While the Drupal community is doing fairly well on the PHP side, many people don't know there is a translation system for Drupal JavaScript as well through the use of the Drupal.t() and Drupal.formatPlural() functions. Read more »

Build your JavaScript With jQuery 1.5.2 in Drupal 7

Posted: April 5, 2011 In / 2 Comments

Shortly after Drupal 7 launched the version of jQuery shipped with Drupal became outdated. Drupal 7 ships with jQuery 1.4.4 but the jQuery community has shipped jQuery 1.5.2. When we are developing the JavaScript in our shinny new Drupal 7 we are already using an outdated version of jQuery. But, there is a solution. The jQuery Update module provides an update for core to jQuery 1.5.2 and jQuery UI 1.8.11. Read more »

Drupal 8 JavaScript Excellence Roadmap

Posted: March 18, 2011 In / 9 Comments

Over the past several months there has been a bit of talk attempting to answer the question, how can we make our JavaScript something we can be proud of and others want to use. Through the conversations, which included a Birds of a Feature session at DrupalCon Chicago, we (a number of people in the community) have come up with eight points of attack to make the JavaScript in Drupal 8 awesome. These aren't everything we hope to accomplish but are an important piece of the puzzle. Read more »