Drupal Mystery #2: The Theme-and-Blocks Chinese Fire Drill

26 Jun 2007
Drupal mystery

In case you don't know the phrase "Chinese Fire Drill", it's an American (?) name for a silly game played in a car full of people: everyone jumps out when the car stops, runs to a different door, and jumps back in. (I guess you have to play to appreciate it.)

Drupal blocks often do the same when you change themes. I like making pages with lots of blocks, on both sides of the page (and maybe one or two in the content and footer as well). Placing them just so is time-consuming and more than a little dull.

"There, everything in place!" – but when I switch to a new theme (a normal part of the experimentation process when making a new site), more often than not my block placement is all undone. Ack! (That wouldn't be surprising if the new theme had different regions from the old, but I'm talking about themes that share the same defined regions.)

The obvious solution: decide the site's theme first, and then arrange blocks. Okay, but sometimes I want to see how the theme looks with my desired blocks laid out, before I decide whether to use the theme or toss it and try another.

Another solution: pin down why the blocks sometimes run their fire drill and sometimes don't. It seems to me that if I have a theme enabled before block placement, and then switch to it, the theme will respect my layout; if I place my blocks and then simultaneously enable and switch to a new theme, the blocks will be shuffled higgledy-piggledy again. Then again, I swear there have been times when taking care with the above still hasn't prevented the fire drill.

It's not a big issue, and can be worked around. Here's the mystery: is this some unavoidable technical issue underlying the working of blocks and themes? Or is this a conscious design decision? If the latter, why? For what possible reason would developers assume that I don't want my blocks in their carefully-laid-out positions any longer when I switch to a new theme?

Drupaloids! What mysteries lie hidden in your Node/51?

Add new comment