Invalid arguments to theme.inc when swapping Drupal databases
Submitted by Jonathan Peterson on November 7, 2009 - 3:27am.Like many small consulting shops, we often work with developers scattered around the world. Recently a Drupal developer delivered a custom theme to us, with a SQL snapshot of the database he had been using to work on it. We installed the new database and eagerly tried out the new theme, only to be met with a slew of error messages of this format:
# warning: Invalid argument supplied for foreach() in /home/jon/Workspaces/php/secretprojectx/includes/theme.inc on line 463. # warning: Invalid argument supplied for foreach() in
Two New Ideograph Success Stories
Submitted by Jonathan Peterson on September 2, 2009 - 7:29am.Last month saw two new Ideograph projects come to completion.
- GreatWorkPerks.com, a website for a Los Angeles based firm that lets employees take better advantage of perks available them through their workplace.
- myEARTH360.com, an eCommerce site for the well-known retailer of eco-friendly products.
A New Interface for iCopyright's Instant Clearance Service
Submitted by Jonathan Peterson on July 2, 2009 - 12:46pm.For the last few quarters we've been laboring over a new version of iCopyright's flagship product, the Instant Clearance Service. The good folks at Blink Interactive did a usability study and came up with two big improvements which have been live for a few months now.
Module and Theme Name Collisions in Drupal
Submitted by Jonathan Peterson on May 28, 2009 - 8:04pm.When building a new Drupal site with a custom theme and a custom module for a project, it seems reasonable to give both the same name — the name of the client, say. But this turns out to be a terrible idea, for a non-obvious but educational reason. Read on for the details.
Programmatically Creating a Hierarchy of Taxonomy Terms
Submitted by Jonathan Peterson on May 2, 2009 - 1:48pm.A new client is leaving GoDaddy's low-quality Quick Shopping Cart product in favor of Drupal and Ubercart. We've stepped in to help them migrate their product data and set up the new site.
A Generic Pair in Java
Submitted by Jonathan Peterson on March 17, 2009 - 6:41am.The Java language lacks a tuple type, so when you need to return more than one object from a method call, you need to create a value object to hold the pieces. As noted in a recent Java Posse Podcast, Java has no Pair object in its standard libraries. Here's our implementation of a reusable Pair object, built with Java generics.
About as Sexy as Java Configuration Gets
Submitted by Jonathan Peterson on February 14, 2009 - 2:50pm.The Jakarta Commons project recently released version 1.6 of their open-source Java configuration library. Code to handle project configuration isn't, admittedly, the sexiest of technologies — but the Jakarta project does it exactly right. Its "composite configuration" features are particularly useful to manage configuration settings for different runtime environments.
Implementing GeSHi on Drupal for Code Syntax Highlighting
Submitted by Jonathan Peterson on January 19, 2009 - 10:20am.Code is much easier to read when its different syntactical elements are colored differently. Modern IDEs do this automatically, but when pasting a code fragment into a webpage it is normally just displayed in a monospace font. We recently installed the GeSHiFilter module, which colors code syntax in our pages automatically. Here's how we did it.
The Detectives, the Dispatcher, and the BlockingQueue
Submitted by Jonathan Peterson on December 14, 2008 - 1:15pm.iCopyright Discovery is a fairly new Java program we've been working on that scours the web for potential copyright infringement. Because it does a lot of pulling content off of the web as part of its job, by refactoring it into a multithreaded application build around a producer/consumer work queue, we increase throughput dramatically.
The Cobbler's Children
Submitted by Jonathan Peterson on December 1, 2008 - 8:24am.After long last, we've finally replaced our old website.
Like the cobbler whose children go shoeless, we hadn't gotten around to giving our website a facelift since 2003 — and we hadn't added any new content to it since late 2005. The old site was okay as far as it went, but we decided to upgrade the technology and content now for a variety of reasons: