Advanced Drupal form theming: Take control of error styling with a form-item-error class

Note: This HOWTO covers Drupal 6.x.

By default, Drupal adds an .error class to the form element itself: textarea, select, input, and so on. Sometimes, that’s not good enough. Maybe a client needs the label’s color changed — or a big, red border encompassing both the label and input elements.

This can be achieved by overriding theme_form_element() to add an error class to div.form-item, the div that wraps all elements in a form.

Alternatives to rebasing in Bazaar

A discussion recently arose on the Bazaar mailing list asking, “Why isn’t rebase support in core?” Rebase support is currently packaged as a plugin. This plugin is widely distributed, even in the standard Mac OS X installation bundle.

There are boring reasons that rebase support isn’t in core, like the lack of strong test coverage. More interesting are questions about the necessity of rebasing in typical workflows.

What is rebasing, and why should I care?

In large projects, there’s a mainline branch representing the current, global, coordinated development. In Drupal’s case, this is CVS HEAD. This mainline might not always be in perfect condition, but there’s a general sense that the mainline is not a sandbox for untested changes. Many changes are small enough that the developers simply work on and test a patch, but this workflow is inadequate for larger development projects like Fields in Core. Such large features require their own branch for development, a feature branch.

Drupal's vulnerability reports are not signs of security weakness

I’ve been tweeting back and forth with Alex Limi, one of the founders of Plone, about the validity of the security analysis from a CMS comparison report that includes Plone and Drupal. He’s proud of Plone’s infrequent vulnerability notices; it had two in the last year. Drupal had 26. Alex also cited a related IBM report on security in a later tweet.

While both reports above seem to identify Drupal (and Joomla! and WordPress, to be fair) as having notably bad security, they’re also both based on one superficial metric: self-reported vulnerabilities. Neither severity nor response time nor history of actual exploitation factored in.

Check out Four Kitchens' hot new logos!

After many months of deliberation, we’ve decided to totally rebrand Four Kitchens. It was a tough decision — there’s so much work that needs to be done — but we decided, in the end, that our firm needed a new look.

Our goals for the rebranding are:

  • Identify Four Kitchens as a leading Drupal consulting firm.
  • Raise awareness of our design skills and portfolio. (We’re not just scalability experts!)
  • Create an iconic brand that associates the Four Kitchens with quality, respect, and community involvement.

Please check out our ideas below. Any feedback is welcome. We really need your help!

Four Kitchens logo: version 1

The Transatlantic Tacky Swag Swap has begun!

Drupal themer extraordinaire, currently ranked #7 on Google for “king of Denmark”, has been bugging us for a Don’t Mess with Texas mug. Well, “bugging” may not be the right word. “Profanely demanding” is more appropriate.

Finding one was surprisingly difficult. While (lesser) cities like Dallas and Houston are lined with shops hawking rattlesnake heads and scorpions encased in plastic, there doesn’t seem to be much demand for Texas memorabilia in Austin.

Except at the airport, where you can find your name stamped on a fake Texas license plate or worn chunk of fencepost.

So, after scoring the great city of Austin for tacky crap, we proudly present’s Don’t Mess with Texas mug:

"CVS Instructions" tab now available for all projects

Drupal’s CVS is now more user-friendly!

As part of the Documentation Sprint at Drupalcon DC 2009, web chef David Strauss built a “CVS Instructions” tab for The tab provides concise, step-by-step instructions on how to check out, commit, patch, tag, and branch any module or theme. A simple drop-down box at the top of the page allows the user to select the version of the module or theme they want to work with, and the instructions are updated to display exact, copy-and-pastable commands.