Posts from March 2012
D6: Garland Theme for Batch Processing
There's a long-running bug in the Drupal issue queue about a bug that I had to work around this week: when using the Batch API, your site theme will only be used for the first page. As the page reloads to show the progress of the job, the ugly, default Garland theme is used (well, that's not entirely true: it's actually Minnelli, but looks like Garland).
In most cases, this isn't a big deal: during a site install or when running update.php, it doesn't really matter what theme the admins see. In one client's case, though, we're using the Batch API to show progress of a multi-part donation that may take some time to process. In that case, you don't want regular site visitors seeing Minnelli: it's a jarring transition away from the site theme, and to anyone who isn't a seasoned Drupal user, it probably looks like something broke.
It took me a bit to find the solution to this problem. The issue I mentioned above is now being fixed for Drupal 8, but the menu system has changed enough that the patches posted there don't work with the older version of Drupal that I'm working with. After some digging, I found the solution: you need to override your maintenance theme.
- Override the
maintenance_theme
variable insettings.php
. Any variable that's retrieved usingvariable_get()
can be completely overridden by setting it in the$conf
array. In this case, you just need to add one line tosettings.php
:$conf['maintenance_theme'] = 'my_site_theme';
Naturally, you'll need to replace
my_site_theme
with the name of your site theme. - Copy
maintenance-page.tpl.php
into your theme directory. Go into themodules/system
directory at the Drupal root, findmaintenance-page.tpl.php
, and copy it into your theme directory—the one that matches the name you set for$conf['maintenance_theme']
, that is.
Your site theme will now be used for every step in batch processing. It's important to also note that this theme will also be used if you actually do put the site in maintenance mode, since that's what you're overriding. Minnelli will still be used for update.php, though.
I'm not entirely certain that the second step is necessary, since a quick test shows that the batch process still used the site theme even when I removed maintenance-page.tpl.php
from the theme directory. It may only be needed for actual maintenance mode, but the comments in settings.php
say to copy it, so I copied it.
Category:
Drupal Version:
DrupalCon Denver Recap
I don't even know where to begin. This is the best I've come up with:
DrupalCon Denver was a roaring success.
This was my second DrupalCon, and I had even spent a week in the Colorado Convention Center a few years ago. I had a pretty good idea what to expect, and it did not disappoint.
I'm still in Denver and still deeply in recovery mode, so I can't muster much of a recap beyond bullet points, but I think that'll do. The links to sessions even include videos.
Monday
- Arrived, checked in, met up with co-workers, and caught up with some people I met at DrupalCamp MD last month.
- Opening Reception in the exhibit hall.
- Cadre-sponsored party at Wynkoop Brewing Company.
Tuesday
- Con actually began, with opening keynote by Dries.
- Attended Eaton's Tame the Burrito: Understanding the Five Layers of Drupal: pretty interesting, and entertaining as always.
- Attended OG7 - Pride and Prejudice: honestly, I didn't pay much attention. I don't use Organic Groups and was just volunteering in that room during that time.
- TruffleBOF: got to meet a bunch of people I've been talking to in #drupal-watercooler!
- Attended Changing the tires at 60 MPH: How Martha Stewart Living migrated to Drupal: interesting and well-polished presentation of a whole of new-to-me-info—but was surprised and disappointed that a presentation about a project to re-launch three properties at Martha Stewart included five men involved in planning and managing it, and no women. Perhaps there were just no women involved in the project, but that seems unlikely given the client. The presenter list this year was not as diverse as it should have been, and this seemed to me like an obvious place to get some women on a panel.
- Attended Greg Dunlap's Painting The Bikeshed: Lessons From A Drupal 8 Initiative Owner: really good talk, but I especially enjoyed his off-the-cuff responses to questions from the audience. He had some really good advice for anyone leading an open-source project.
- Official DrupalCon party at City Hall nightclub. At first, I really didn't like the place: it was packed and way too loud for conversation. A few of us wound up gathering in a quieter area upstairs so we could chat, and it wound up being a lot of fun.
Wednesday
- Attended Mitchell Baker's keynote: interesting to hear what Mozilla has been up to, though I don't think she adequately addressed the tough questions from the audience regarding video codecs and how Personas is supposed to be better than OpenID.
- Attended The Drupal Contribution Ladder: A Gift and a Challenge to You from Boston: I'm really excited about what the Boston group has been doing over at LearnDrupal.org. They also hosted a BOF in the afternoon to get people to write up some simple lessons for the site, and I intend to continue contributing to that project when I can. There's a real need for more experienced Drupal site builders and developers, and those people need to start at the beginning; this site will be a great resource for people who want to dip their toe in and get started.
- Attended Fabien Potencier's Drupal 8 Meets Symfony2: prior to this session, there were a lot of questions floating around about how Symfony2 was going to be integrated in Drupal 8, and this presentation really clarified (for me, anyway) what Symfony2 really is—turns out, not just an MVC framework—and what parts will be used in Drupal.
- Attended Randy Fay's The Future of Drupal Governance: as Randy's sessions tend to be, this was a brief presentation followed by a lot of discussion from the group. Randy and others have since moved this discussion to an issue queue on d.o.
- Had dinner with the Jackson River team at Root Down.
- Caught the second half of EatonCon 2012 at Rock Bottom Brewery and met a ton of people. Sometime around midnight, my ability to remember names maxed out, and every new person after that just overflowed the buffer.
Thursday
- After EatonCon, Thursday had no chance of starting on time. I missed Luke Wroblewski's keynote, then spent some time at the Jackson River booth, and before I knew it, it was lunch time and the con was almost over.
- Attended Gábor's Thrown Into a Shark Pond? A Guide for Surviving Core Development and Even Enjoying It: this was a good primer for people like me who want to get into core development, and a good prep for Friday's sprint (more on that below).
- Attended webchick's What's next for Drupal.org?: it was interesting to consider how much has been done on d.o in the past year, and how much more really needs to be done. There are several projects—most notably, upgrading the site to D7—that really need to get done.
- Attended the Closing Plenary: the most notable part of this (aside from seeing all the volunteers that made DrupalCon happen) was hearing about DrupalCon Sao Paulo. This December will see the first DrupalCon in Latin America, and I think that announcement came completely out of the blue (hah!) for everyone there. They also officially announced DrupalCon Portland for 2013, but the website was up a day earlier so everyone already knew about it; Sao Paulo was the big news of the afternoon.
- Attended the Drupal Association Board Meeting: mostly boring business-y discussion, but it was interesting to see how they work.
- Most of the Jackson River folks went on a brewery safari, and the Drupal trivia night took place at the convention center, but I was so beat up from the parties the rest of the week that I made it an early evening to rest up for Friday.
Friday
Sprint day! I've been meaning to get into core development for months, and the core mentoring sprint was exactly the kick in the pants I needed to get into it. Many thanks to xjm for all the instructions and work she's been doing in this area for months, and to linkclark, tim.plunkett, ZenDoodles, cweagans, and kbell for helping so many of us out with questions throughout the day. Jackson River has graciously granted a few of us developers some time to take part in core mentoring hours in IRC, so I'll be able to continue helping out with core issues every Wednesday.
And that pretty much brings me up to the present. I've spent my evening catching up on email and RSS feeds and packing up the suitcase worth of stuff that managed to overtake my hotel room throughout the week. I have to be up early tomorrow to catch my flight home, and I was too wiped to do anything fun tonight anyway.
DrupalCon lived up to the high expectations I had for it: I learned a lot, met so many people that I can't possibly remember most of their names, and can happily spend my Friday night relaxing in a hotel room, satisfied that I've made the most of my week. I'm going to miss everyone, but once I catch up on sleep, I know I'll be invigorated to get more involved, to write more patches and create more modules and help more people on IRC—and missing everyone just makes this once-a-year event all the better.
Thank you, Denver team, for putting on such a great event, and thanks to everyone who attended and breathed life into it.
EDIT: Almost forgot. At the official party Tuesday night, I fumbled my iPhone and shattered the rear glass panel. But, thanks to a Drupalize.me sparkle pony sticker, it's been patched up nicely!