Drupal development, project updates, occasional knee / head slappers

Sep 25, 2012

I was playing with Navin, an Omega sub-theme, and wanted to make some minor adjustments to the CSS, and maybe have a custom template.php file to work with. The best way to do this is to create a sub-theme of the sub-theme (though I kind of wish there was a way to just add a plan old CSS file somewhere - and I feel like maybe there's a way to do that I'm spacing on). 

To get this to work required a few steps. My use case is that I'm working within the Open Enterprise Drupal distribution to get a fairly simple Drupal-based blog set up. It comes with Navin as the default theme.

  1. Downloaded Omega Tools - a module that adds a Drush tool to create quick and easy Omega sub themes.
  2. Created a subtheme using drush omega-subtheme nameofmythemehere on the command line (though the manual instructions here would have worked using the HTML5 version, I believe).
  3. Copied the code from /themes/navin/ (everything below the settings[alpha_css][navin-footer.css] = 'navin-footer.css' line) and pasted into
  4. Copied the code from comment 1 on a helpful Navin issue queue post and pasted it in above what I just added to The idea here (if you're using a different subtheme) was to pull in the subtheme's CSS into the sub-subtheme.
  5. Changed the name of the subtheme from omega to navin.
  6. Enabled the new subtheme in the Appearance settings page.
  7. I also had to clear my caches for this to take because I had done some messing around in the .info file and wanted to clear out any stray settings.

That was enough to do the trick.

Sep 25, 2012

I'm giving away 5 free memberships to a random selection of people who call into BuildAModule sometime in the next 2 weeks to leave a voice testimonial.

If you're enjoying BuildAModule and would like to let us and anyone else evaluating the service to know how much you get out of it, your message would be genuinely appreciated.

Leaving a message is easy, just check out this page, click the Call me button, and have your say.

Sep 25, 2012

This guy terrifies me a little. Good show, spidy!

Sep 25, 2012

If you see errors like this all of the sudden in your Drupal 7 site and you're trying to figure out if maybe you accidentally moved a file or your cat walked across your keyboard when you were looking at peacocks fighting for a dead snake out the window, it's probably not you. It's your MySQL settings.

You might see the following kind of error:

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: DELETE FROM {cache} WHERE (cid LIKE :db_condition_placeholder_0 ESCAPE '\\') ; Array ( [:db_condition_placeholder_0] => entity\_info:% ) in cache_clear_all() (line 176 of /Chris/Websites/

To fix it, change the max_allowed_packet value in your my.cnf file (that's your MySQL configuration file) to 20:

max_allowed_packet = 20M

Thank you to this thread on, which also describes where to find your my.cnf file.

Here's what the mess might look when you see it:

Sep 29, 2012

I've known that TomRandall and the rest of the crew at Level 10 have been working on Open Enterprise for a while, and I'm excited to have a reason to give it a go. I'm in the process of numerous upgrades to BuildAModule, one of which is making the current bare-bones blog more integrated with the technical advances of the last decade.

Since it's been a while since I've spun up a Drupal-based blog, and since I know there's numerous aspects of blogging and content creation I'd like to finally wrap my mind around and implement (like RDF, HTML5, pingbacksSEO Tools), I'm thinking that the right distribution could save me time. I'm not entirely sure Open Enterprise has everything I'd like to integrate, but I know it has some good minds behind it. Or, it could turn out that I'm not the target use case for Open Enterprise and I could spin my wheels a bit, but I'm going to take the gamble so I can get familiar with a product that I know is on the edge of some awesomeness. 

So, here's an 'unboxing' of Open Enterprise. In particular, I'm using the Enterprise Blog version, which I'm thinking might be the same as Open Enterprise at it's core?

As per a typical Drupal installation, I downloaded the source, set up an empty database, added a virtual host via my MAMP Pro, and went to the new site.

The installation process gave me an Open Enterprise installation profile, and prompted me to install a set of 'apps'. I was tempted to check everything:

After all that installed, it had me fill in the default admin user and site information screen. After I submitted that, I hit a screen asking me for my FTP information. That threw me off a bit:

I tried to submit the form with nothing in it, then filled it with bogus information, thinking that maybe I could deal with it later. But neither of them let me pass. I did a quick search in the issue queue, and pulled this up which said that I could just make the sites directory writable, which I did by cd-ing into the Drupal directory via Terminal and doing a

chmod -R 777 sites

I remember running into something similar on Pantheon, I imagine for similar security reasons. But I'd sure like to have had a few more details on the screen about why this was needed.

After I did the chmod, I went ahead and refreshed the page, which seemed to push the installation process to the next step. However, not without a few errors (a lot of which just have to do with my level of reporting):

Some of these errors had to do with images, and as I started clicking on bits to look at content, I saw that there were no images and I was getting errors like:

Messing about with SEO tools

So, the first thing that I want to play with is the SEO tools to see if there was anything in there that would clearly be a benefit to my current workflow, so I go to create a piece of content and just copy over a blog entry from my personal blog.

Next, I scrolled through the vertical tabs at the bottom of the content and clicked on the Content analysis one. Everything was enabled except for the Alchemy item, which got me curious, so I followed the steps to set it up, which required the following:

  1. Downloading the PHP SDK files from here.
  2. Putting the files in the AlchemyAPI folder in the alchemy module folder (but you have to take the files out of the expanded folder)
  3. Going back to the content and trying again. This time I need an API key, so I follow the instructions
  4. I sign up for an Alchemy account, verify my email, request the API key, copy it and paste it in

Another disabled tool was the Readability section, and I didn't want to dig into that after going through the 10-minute Alchemy setup. But I did watch some of Tom's video on it  which was good (Tom has a nice screencasting voice).

Once Alchemy was set up, the check seemed to go through and I got some additional info:

After checking out the 3 tabs there, nothing appeared to be particularly useful for this article at least.

The Quick SEO tab had some good tips, mostly I think for folks just getting a feel for the amount of content to plug into a typical article:

At this point I think that maybe I should save the article, since it's showing as just having 12 words when there's definitely more, and realize that I pasted the content into a WYSIWYG. My content contains html tags, so I want to paste source in, and I don't see any source code icon (that would have been nice to have).

So I went ahead and copied my content straight from the public facing page into the WYSIWYG, which got everything including some object tags I had in there, and after that there were some better results from Alchemy:

I played around with the SEO tools for a bit, and couldn't get the keyword search to work. I noticed that you could hover over keywords like you see above to show menus for adding keywords to some kind of list, but after adding a few items I wasn't able to find where the list was. I imagine there's a bit of a learning curve here, but it seems like there's got to be some potentially good stuff in these tools.

Next, I wanted to see what the output of a typical blog post looked like, so I checked out the source code. Woah! I haven't seen that many CSS and JS files on a page before. But, I know you can turn on aggregation, so I ceased the freak out and scrolled down to where the body started:

I've been diving deeper into HTML5 over the last several weeks, and I was hoping to see some <article> and <footer> stuff with oddly named attributes, and I wasn't disappointed (though I'm curious why the footer was at the head of the article). I'm still wrapping my mind around best practices around HTML5, and I imagine that looking at this might contain some good lessons. 

In the Open Enterprise description it mentioned that it's using a flavor of Omega for a responsive theme, so I played with the browser window size a bit to see what changed, and got a re-sized logo and stacking in the navigation on the smaller window size. At an even smaller window, the sidebar drops down below the content. Cool.

When I go to check out the blog page as an anonymous user (after publishing the page), I get Access Denied. Bummer! ;)

Okay, so permissions are set up to keep anonymous users at bay. NO BLOG FOR YOU! Well, I kind of want people to read this stuff, so I went to the permissions page and made a couple minor adjustments:


Hey, that blog page looks pretty good! Except for a little floating issue with the comment buttons:

So at this point, I want to see how hard it would be to integrate Disqus with this blog. I first go to the modules listing page on the off-chance that it's already included. It's not, and I noticed while I was there that Drupal core and the theme is already a bit outdated:

It's tough to keep up with Drupal, man. 

I knew from talking with the Level 10 folks that they were really getting into integrating Apps, so I wanted to check out the App listing to see if I might have missed anything. In the admin bar I clicked Apps and then took a look. I didn't see anything there, so now it's time to download a module and see how well it integrates with the distro.

Okay, that took a few minutes but everything went smoothly. I now have Disqus enabled on blog posts, and normal commenting disabled.

Now I want to click around a bit. I click on the Images tab, and WHAT'S THIS? Whirlyball? And who's the psycho int he middle who clearly runs the operation?

This default placeholder content is way better than what my real content is going to be. ;)

When I click on HOME, I get a Page not found:

Bummer again! The Add URL redirect link is enticing, but when I click that it looks like it would set the redirection for any 404s, rather than just the home page:

Okay, so I'll leave that as is for now.

As my next task, I want to set up those social links at the bottom of the page to point to something functional. Icons would be nice, too, but I'm suspecting this is a standard Drupal menu and getting those icons might take a little pulling of teeth:

Indeed, there's a little cog wheel that's a bit hard to see against the blue, that points me to edit the Social menu, where I update my links.

Getting my share on

Now, I want people to be able to share posts, ala ShareThis. So, I take a gander through The Configuration menu and see a Social media item, which I click on. As I scroll down, it looks promising:

Okay, but how do I get these to show on my blog posts? As I'm looking around, I run into this, which looks a little off:

I'm also getting some overlay screens where there's no way exit because (I'm guessing) the close button is under the admin toolbar:

Then I browse to the modules page and see that maybe the social module I'm seeing isn't fully functional yet:

I check out the Help page and it mentions something about one's profile, so I think that maybe I have to associate the social media accounts with my user, rather than the site, but when I go to my user account page, I just get a submit button:

So I scroll down the modules listings page, just to see what's in there. And what's this?

This looks promising. So here's what I do:

  1. Enable the Widgets module
  2. Check my blog post to see if social icons magically appeared. They didn't.
  3. Went to the Widgets module page to see if there was any insight there. Indeed there was!
  4. Based on what I read, I went to the blocks configuration page and enabled the Widgets: socialmedia_share-default block in the Content region, above the Main page content block.
  5. I went back to the blog past, and whammo!

Okay, so I kind of like the ShareThis versions that include details about the different networks' activity (though I just found out you can up the count just by clicking on the icons), and based on the info on the Widgets module page, I probably just need to include the Service Links module for that.

Things to investigate and update

So I'm liking this so far. I have a responsive theme that doesn't look like crap, I have a lot of my needs anticipated in terms of blogging setup. I'm on Drupal 7, which feels like the future after working on Drupal 6 so much these last 6 months, and it seems like the feature modules / apps are thoughtful and goal-oriented, meaning I can probably get some nice functionality pretty cheap if I have the need for additional features later on.

At this point, there's a few things I want to check out / fix / accomplish / learn:

  1. Get the site branded.
  2. Figure out how to interlink pages with automatic Related to this article functionality for better SEO.
  3. Set up archives and a tag listing blocks or pages for better SEO (correct me if that's old school thinking).
  4. Check out how forms do on the responsive front.
  5. See if enabling the view source on the Wysiwyg is going to break a feature module
  6. Research current best practices on working with Features in a distro (I'm curious if anything has changed since I put together a video series on the subject)
  7. See if I can use Alchemy to automatically tag and enrich posts for search engines, ala the AlchemySEO service / product. And also, is that kosher?
  8. See why I can't get keyword searches to work. Is there some API key I need?
  9. Check out RSS feeds. And is there any integration with PubSubHubUb, and do I really need to care about that?
  10. What about trackbacks and pingbacks? Do people use those? Any reason they weren't included in the distro?
  11. Play with OpenGraph MetaTags to see how it impacts mentions in Facebook
  12. I'm curious what the UUID module means for nodes. Can I use them in feature modules now (the last time I tested that it was buggy)? Is that what it's intended use is in Open Enterprise?
  13. Integrate a menu-search tool like Coffee, or maybe finally check out the Drupal 7 port that Amit Goyal made of Navigate.
  14. Do some Adobe Shadow (or Edge Inspect as it was newly released today) to check out how this Omega theme looks on a few different devices. And make sure images are 100% max-width (they get cut off as the screen gets smaller).


Thanks to the Level 10 folks for putting this distribution together. I know it's super hard to build features that work for lots of use cases, but it seems like they're doing a really good job so far. I'm looking forward to seeing how fast I can get this to production. :)

Sep 24, 2012

Ever since I heard about the VoIP Drupal module, I've been itching to set up some kind of service that allows people to call in and leave testimonials for BuildAModule. But, I haven't had a chance and decided today that it was time to do something about it. I ran into this awesome article outlining the process of using Google Voice to set up the service, and ended up with this (click this if you want to tell us what you think about BuildAModule):

Here's the breakdown of what to do:

  1. Go to your Google Voice page (you can set it up at this point if you haven't already)
  2. Click the settings cog wheel
  3. Click Call Widgets
  4. Click "Add a new Call Widget"

Next, you set up the widget:

  1. Enter a name for the widget
  2. Select "Send to voicemail"
  3. Click "Record now" to record a new greeting

Finally, copy the widget object code and embed it in a web page:

If you want to embed the testimonials on the page, go to your inbox, and on the message you want to embed:

  1. Click on "more"
  2. Click on "embed"
  3. Copy the embed code and paste it into your web page

Here's an example of that:

Sep 24, 2012

Well, the itch to blog rapidly with quick screenshots finally got to me, and I spent the last couple of days re-working the Drupal Evernote module to get it functional with the new Evernote API updates and Oauth.

One failing of the first module was that there were a lot of steps involved to get it set up. In this new version, I've simplified the options quite a bit. Today I started using it in practice on, and it seems to be working pretty smoothly. Before I release it into the wild, though, I'm going to give it a bit to work out any kinks. Man, it's a lot of fun being able to blog straight from Evernote. I've also set up a system to post directly to Facebook and Twitter as well with some simple tagging (I'll talk more about that later).

I went ahead and added it up on Github so folks can goof around with it until I can get a chance to re-grok the Drupal module tagging scheme. Also, right now it's just for Drupal 6 (since that's where my itch is).

Here's a screenshot of the admin page:

Sep 23, 2012
I just put together my first flowchart in years to diagram my new blogging workflow, and had a hard time coming up with a program that would make the chart look pretty automatically. Like, without me having to whip out any artsy on the fly at 10pm.

The best one I've found so far is called Lucid Chart, which incorporates online sharing like several other tools I saw out there. I'd love to hear if anyone else has come up with anything better, that's also really quick to use.

Sep 24, 2012

A couple years ago I put together the Drupal Evernote module so I could use Evernote as a blogging platform. I even set up a rules with the Rules module to post to Twitter if there as a particular tag associated with it. 

There were a few issues with the workflow, and I also started feeling a bit quieter, so I eventually stopped using it. And because I've drunk the Koolaid and realize just how easy it can be to blog, I haven't taken much time to actually compose many posts over the last couple years.

But I got tired of the quiet (it's way more fun to share cool stuff), so I spent the last couple of days updating Evernote, and figured out a workflow that will allow me to post to Twitter and Facebook selectively using a service called Twitterfeed.

Step 1: Set up the Evernote module

The updates I made to the Evernote Drupal module make it much easier to use. Just plug in where you want to pull Evernote from, and where you want to put the notes. Once this is set, cron will pick up any notes and create nodes from them. Here's a quick screenshot of the new Evernote module settings page (there's just one):

Step 2: Create feeds for different social networks  

I created RSS feeds for blog posts that should go to Twitter (all posts that have a 'tweet' tag), posts that go to Facebook (posts with a 'Facebook' tag), and one each for status updates to Facebook or Twitter (i.e. updates that are just text and don't include links back to articles). Here's a screenshot for the Views settings page for the blog:

Step 3: Set up Twitterfeed

Next, I set up Twitterfeed to pull from each of the feeds I created and post to their destination social networks. Here's a screenshot of part of the dashboard:

And here's what the workflow looks like

I use my blog as a central hub. It's public and I can create selective feeds from it. Evernote just becomes by source for creating content. 

So when I want to create a blog post, Facebook post or Twitter status update, if I'm at my laptop I'll fire up a new note with Evernote's global shortcut key (so I can open it no matter what app I'm in), type away, use Mac's keyboard shortcuts for creating screenshots to paste in, and then when I'm ready to post, I might add tags for Facebook and / or Twitter, then I'll set the notebook to the one I'm syncing with the blog. That's it.

At some point, the note will get synced with the central server, cron will run on my blog to pull the content in, then Twitterfeed will run to grab the content from the feed and push out to wherever I want it to go. There is a bit of a delay here, but the workflow is so simple that unless it's urgent, the time savings is so worth it

Sep 23, 2012
Okay, so we came across this machine with a gum ball already in it, so I'm making a couple assumptions about how it works.    

First (1), you put in a quarter, and a gumball drops into the 'pinball' game (pizza guy in between the flippers) and comes to rest at (2). Right where the kid in the front has his left hand is where there's a button you press to launch the gumball, like you do in a pinball machine. When you do this the first time, you'll probably do what I did, which was to give it a solid push, which launches it straight into the "Lose" hole (3), where it will be lost forever.  

What you apparently you're supposed to do is drop another quarter in and spend a little time really getting a feel for the button at (2), and get it to send the gumball to the side, where you can further direct the gumball with the flipper buttons at the two (4)'s, ideally into the "Win" holes to either side of the "Lose" hole. If you get in one of those holes, my guess is the Pizza Hut guys come out from the back and give you a big cake and hugs all around. And maybe you actually get the gumball.  

Syndicate content Syndicate content Syndicate content Syndicate content Syndicate content