drush

Feb
4
2012

Drush make and Pressflow

A quick note on using Pressflow as the basis of a Drush build using Drush make can be a little confusing as the changes necessary to use the newer github-based repository aren't abundant. So without further ado here's what works:

projects[pressflow][type] = "core"
projects[pressflow][download][type] = "git"
projects[pressflow][download][url] = "https://github.com/pressflow/6.git"
projects[pressflow][download][tag] = "DRUPAL-6-24"

Note that the previous instructions around the web tend to be problematic because the tarball file contains a git repo which Drush make doesn't know to strop since it's getting it as a tarball instead of from git.

Dec
1
2011

Create custom Adjix short URLs with Alfred

Alfred.app Logo Although I use it all the time it turns I haven't written here about Adjix. There is one mention in some issues but nothing that spells out just how awesome it is. The short version is Adjix is hands down the single best URL shortener out there. While it deserves it's own post suffice it to say you can use its power and still retain a copy of your links on your own S3 drive. Future proofing at its best.

But this post isn't about that. It's about using your own custom domain and setting up a URL shortener that works from Alfred. Alfred is itself another awesome tool that deserves yet another post. Inspired by a post on Dirt Don I set out to create a url shortening shortcut. (Recursion is encouraged).

So based on this post I setup a quick shell script shortcut in Alfred. The properties end up looking something like this:

Nov
26
2011

Drush away unserialize() errors

When you work with the great folks I do every day it comes as little surprise that when the stuff hits the fan and some site is in need of help there will be a legion of folks who jump into round-the-clock action to get things in a better place. While this could be a whole blog post about that alone it's not about that. Rather it's about one of those nagging little problems we came across while working on a site this Thanksgiving "holiday".

The problem is one that many have seen at one point or another:

[26-Nov-2011 22:35:17] PHP Notice:  unserialize() [<a href='function.unserialize'>function.unserialize</a>]: Error at offset 200 of 1100 bytes in /var/www/mysite/includes/bootstrap.inc on line 1104

In fact this problem pops up enough that it has its own page in the Drupal Handbook. The problem is pretty straightforward to understand. Some object was serialized for storage in the database and has become corrupted.

Finding the source of the problem, however, can be challenging. The Handbook page has several examples and more in the comments of some quick hacks that can be done to bootstrap.inc or can be employed with their own database connections to test these serialized values. There are times when neither hacking bootstrap.inc nor connecting to the db directly are practical. Indeed for many using Drush is a good way around both of these. I spent a couple minutes looking and didn't find any scripts out there yet so I cobbled together a quick Drush command to help out here.

Syndicate content