DrupalDork.com was shut down on September 18, 2013. This is just a snapshot of the site as it appeared then.
Interested in taking over DrupalDork.com? Get in touch.

Trigger a javascript event when an autocomplete field changes

Related to my fieldset summary problem: autocomplete fields do not trigger the change event in Javascript, for some reason. I wound up stealing part of a patch I found somewhere (I would link to it if I could find it in my browser history) in order to override the autocomplete prototype function and trigger a new autocompleteSelect event when the user chooses an item in an autocomplete field. Just drop this function into a Javascript file in your module or theme:

Category:

How to force an update of the summary on field sets (in vertical tabs)

Please excuse the long title: it took me a while to figure this one out, so I want to make sure that other people can find this when they need it.

On my current project, I'm changing the node author field based on the value of a user reference field on the node type: when a content admin sets the node reference field, the node author field is changed to match that user reference field value. Since the author field is shown in a fieldset, I wanted the summary on that fieldset to update when this change was made. It took me a while to figure out how, but it's pretty simple:

// Update the field summary if vertical tabs are in use
var tab = $('fieldset.node-form-author', context).data('verticalTab');
if (tab) {
  tab.updateSummary();
}

Category:

The four stages of the Drupal developer life cycle, by Ben Clark

The rest of this post has a different, decidedly-non-preachy voice, but this was my favorite part:

If you're a PHP genius, the world deserves to know; if you're barely competent, the world deserves to know that, too. If you won't stand by your work, then we don't want you in our community. Stop believing that you're the only one who will want that feature you're developing. Stop yourself from thinking that your implementation choices are without flaw.

From The four stages of the Drupal developer life cycle. I worked with Ben for a couple years at Jackson River and he's a hell of a guy.

Category:

Back to Work on Joomla

Finally catching up on Back to Work, in particular Cascading Wave of Bad:

Merlin: …I'm sure Joomla can be very, very pretty—have you ever used Joomla?
Dan: No.
Merlin: That control panel. Oh my God. The control panel—it looks like somebody dropped a thesaurus. It doesn't make a lick of sense to me.

Nothing but love or our open-source brothers and sisters in the Joomla world, but man…that control panel is exactly why I decided to go with Drupal.

The Drupal Ladder

I mentioned the Drupal Ladder initiative in my post about DrupalCon Munich, but didn't really talk about what it is. I expect that most of my non-client-work Drupal time for the forseeable future will be focused on the Ladder, so a bit of explanation is probably in order.

The Goal of the Drupal Ladder is to have 1% of the Drupal Community contributing to core by 2014. That's the short version. A very low percentage of users on drupal.org have contributed to core, and we'd like to increase that percentage so that more people are helping maintain the system that we all use on a daily basis.

Category:

DrupalCon Munich

DrupalCon Munich took place last week—well, last-last week, I guess—and it was pretty rad. I just got home a couple days ago, myself. My wife Erin and I figured that as long as I was in Germany already, we may as well make a trip of it, so she flew out on Friday (the sprint day of the con) and we spent the weekend in Munich, then flew up to Berlin for the following week. The whole trip was a blast, but we're talking about DrupalCon here.

If I'm being honest, the first couple days of the conference were largely lost on me. I was more jet-lagged than I thought, and I think a little bit culture-shocked by failing to understand just about everything that was being said around me. I took a year of German in college (eight years ago now), but that did remarkably little for my ability to communicate with people there.

It's almost time for Munich!

Holy crap, can you believe that DrupalCon Munich is just two weeks away? This summer has been flying by!

I, for one, am equal parts excited and apprehensive. DrupalCons are always exciting: I get to see friends I've made over the last couple years, and always meet a ton of new people. But, at the same time, I'm a little bit worried about two things: finding my way around, and being on a panel.

I really shouldn't be nervous about the panel. I'll be speaking with Karyn Cassio, Addi Berry, and Paul Johnson about making local meetups work, in the last session slot on Wednesday. All three of them are easy to talk to, and we've got a ton of information and ideas to share.

Category:

Video: Drupal is Stupid (But I Love It Anyway)

This past weekend was the second CapitalCamp here in DC, and I wound up doing a session on Friday morning. I was one of the organizers of the event, but submitted two sessions early on (mostly to start filling up the Proposed Sessions list). When it became clear that we had a ton of great session proposals (and I was going to have my hands full all weekend), I withdrew my proposals.

But, a speaker had to cancel his session a few days before the camp, and since I had previously done this talk at the DC PHP user group back in November, I was asked if I could fill the slot by doing it again. I think it worked out well: I've been asked by a lot of people who couldn't make it back in November if there was a video available, but at the time, I didn't really know how to use Keynote and failed to record it. This open timeslot gave me a chance to record a video, and to update some of the content of the talk.

In any case, I think it went pretty well. The audio peters out near the end: the Q&A became more of a discussion, which was great at the time but didn't get picked up by the mic.

Category:

Follow-up: This Module Doesn't Work Right (And What You Can Do About It)

I gave this talk at Drupaldelphia this past weekend, and finally got around to pulling together some resources for those interested. The video is below; it was recorded in Keynote, so it's just the slides and the audio is so-so.

Category:

Speaking Gigs Coming Up

I've got an exciting couple of months ahead of me!

Next Friday, June 22, I'll be speaking at Drupaldelphia: This Module Doesn't Work Right (And What You Can Do About It).

The last weekend of July will be the second CapitalCamp here in DC. Session selections are happening this week, so the chosen sessions will be announced soon.

In August, I'll be off to Germany for DrupalCon Munich. I'll be on a panel about organizing local meetups, along with Karyn Cassio, Addison Berry, and Paul Johnson: To Beer Or Not To Beer? Making meetups work.

It's going to be a nerdy summer!

Category:

Github: Creating Pull Requests for Existing Issues

Did a quick screencast with some coworkers today on the latest thing I love about Github. Last time, I covered how to create pull requests. This time, I explain how to create a pull request out of an existing issue. Since pull requests are basically just issues with commits attached, it's often undesirable to create a new pull request to address something reported in an existing issue, because you just wind up with two issues that address the same thing.

There isn't a way to do this through the Github interface, but the hub command line tool adds some special sauce for working with Github, and the thing I use it for most is opening pull requests for issues.

The quality is crummy, so turn up the quality to 480p.

Tags:

Category:

Let's Talk About Sex

As it often is, sexism in the tech industry was the topic of a lot of back-and-forth on Twitter this past week. It started with the revelation1 that a modeling agency in Denver had been contracted to staff "booth babes" in the DrupalCon exhibit hall back in March, and continued (as it so often does) with debate over what behavior is appropriate at professional-ish industry events like DrupalCon.

The issue of "booth babes"2 is the one that got under my skin the most, so let's talk about that. First, allow me outline my basic position on the issue:

Category:

Intro to Github Pull Requests

If your company is hosting code in Github, I sure hope you aren't committing directly to master. This quick screencast demonstrates how to use pull requests so that teammates can review code before it gets merged into the master branch.

Make sure you turn on HD so that the text is legible.

Category:

Module Release Announcement: Node Subpages 7.x-2.0-beta1

I've been on a bit of a CTools kick lately, and my latest experiment was Node Subpages.

Node Subpages allows site admins to configure per-content-type subpages that display the contents of a view or a field on the node. The project page has a more complete use case and example links.

Big Career News

Exciting but sad news:

On Monday, I'm joining Lullabot as a Drupal developer. Tomorrow is my last day at Jackson River.

I am thrilled to be joining Lullabot. Not long after I began working with Drupal a little over two years ago, I knew that I wanted to one day work for the company. I was able to get up to speed quickly thanks to their training videos, I learned how to build modules properly at the Deep Dive Week, and I learned about Drupal 7 during the Webchick tour: Lullabot has been instrumental in getting me into the Drupal world, and I knew from the first time that I met some of the 'bots that I wanted to work with them one day. I even mentioned it on Eaton's blog about this time last year:

Is it weird that I aspire to one day be a Lullabot?

QuickPost Bookmarklet on Dreamhost VPS with Suhosin

This is probably the third time I've fixed this problem, so it seemed time to write down the solution.

On my personal sites, I make use of one my own modules, QuickPost Bookmarklet. The module geenrates a bookmarklet that allows you highlight text on a page and begin a new blog post on your own site from it.

My sites are hosted on a Dreamhost VPS, and once in a while, this bookmarklet stops working on me: if I select a longer piece of text, it won't pre-fill the body text area on the node add form. The title value still works, but not the body, suggesting that the server was ignoring (rather than truncating) that query value if it's too long.

The problem lies with Suhosin, which is enabled (I think?) by default. The offending setting is suhosin.get.max_value_length, which keeps getting set back to 512. I'm not exactly sure how it works, because I found that the values in the query string actually stopped working somewhere around 700 characters, but no matter.

Category:

Inexperienced Drupal Developer

From Inexperienced Drupal Developer:

I've recently noticed there are a ton of local Drupal jobs looking for experienced developers, and also a ton of awesome, but inexperienced developers looking for jobs. This seems like a problem. If people can't get experience in jobs, they can't get jobs that need experience. I'm hoping to help solve this problem by posting the job I've never seen. I'm seeking an inexperienced Drupal developer.

This is a FANTASTIC idea. We all know that the Drupal world needs more developers: every shop in every town is hiring. Scott's approach is a great way to get someone started off, and I'll bet that he's received a torrent of email already.

Category:

The Boston Initiative in DC

Last night, a handful of us in DC got together to discuss bringing the Boston Initiative to DC. My notes are on the DC group, with links to lots of additional info for those unfamiliar with the project.

I expected a pretty quick planning meeting: how often can we do sprints, where can we hold them, who wants to help organize them, etc. Instead, we quickly got off on a tangent about the merits of LearnDrupal.org and concerns about the content, how it's structured, and whether it's just duplicating existing training materials.

I was a bit frustrated by the way it went, but after sleeping on it, I'm really happy it did.

Category:

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.

Category:

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.

Category:

Pages

Subscribe to Drupal Dork RSS