Bug in Drupal Panels v2.0rc1a to watch for


There's a bug in Drupal module Panels v2.0rc1a which you may need to keep an eye out for. If you happen to be using the default_panel_minis() hook to programmatically load minipanels you won’t be able to edit or export the minipanel once it has been loaded:

The only way I’ve found to work with the minipanel from that point is to paste the exact same code from the default_panel_minis() hook into the importer. A bit of a bug, you might say.

I haven’t tried any of the other default_panel hooks, but the minis one does at least exhibit this problem.

I'll post a follow-up if I find a fix someone else has committed or end up doing one myself.

I just love Drupal's architecture - export & API hooks


While the architecture itself is improving with age, I just love that so many modules have followed Drupal's concepts and have added API hooks all over the place. For example, in the new Panels 2 you can export panels to files then set them up in a module with e.g. a default_panel_minis hook to have them automatically loaded. This allows you then to develop complex views and panels locally, push your module to the production server and have the new views and panels automatically show up - pure awesomeness! More details on how to do this later in my ongoing series of Drupal rants & tutorials.

Problems with Drupal 5 - clumsy record sorting


More of a problem for administrators than site visitors, and definitely more of a nuisance than a real problem, it can be frustrating dealing with lists of records in Drupal 5, especially when you need to resort or reorder the list. A perfect example is using the Nodequeue module, one of the most popular modules which lets you create a queue of articles/nodes so you can e.g. manually create a list of top stories for the week; it's interface for managing the queue looks like this:


If you decide you want to have the Quibus article after the Facilisi Eligo one you have to click those buttons to the right side, listed in the Operations column, then wait for the page to update. Not much of a problem if you're just changing one item, but if you have a long list and need to do a lot of organizing (which can happen often on busy sites) it can be a definite hassle.

This is how all of Drupal 5's lists are handled - you have buttons to let you move items up one step, down one step, or to the top or bottom of the lists, and every action requires a complete page reload. On most admin pages this can be a several hundred kb page to download again, usually entails a rather large set of queries and can just take an awfully long time for what should be a very simple process.

Enter Drupal 6's heavy usage of Javascript thanks to a both the Drupal community's greater understanding of the bundled (mega-super-awesome) jQuery Javascript library, and a certain Nate Naug and a few others who did all of the hard work :) Now, when you're looking at a list of items it might look more like the following:


Drupal 6 uses Magic Tricks(tm), aka jQuery, to allow items to be reordered just using simple drag 'n drop, then you hit a Save button to record your changes for the world to see. Simple, elegant, and at this point (I think) everything that used the old way has been updated to the fancy way, making everyone's lives just a little simpler.

Dupe Windows drive images in VirtualBox


VirtualBox is a pretty good virtual machine system from Sun Microsystems that has several key benefits:

  • It's free, whereas most others are commercial and can cost a chunk of change,
  • It's multiplatform, so a company can standardize on it across all of their supported systems.

It seems to be pretty capable in regards to running client operating systems - it has a menu which lets it automatically configure itself for a wide variety of Windows releases, UNIX distributions, etc.

The only minor problem I've found is in regards to how it handles disk images - the virtual disk files it creates to store the client operating system. The problem is that you can't just duplicate the file from your file manager or command line, because it identifies each disk file with a unique identifier that obviously doesn't change when you manually copy it. Instead it comes with a command which will do the duplication for you, only it's hidden in OSX.

So, if you need to duplicate a drive image in VirtualBox on your Mac OSX machine, you would run a command like so (all on one line):

/Applications/ clonevdi Windows_XP_IE_6.vdi Windows_XP_IE_7.vdi

Ta-daa! All done.


Subscribe to Computery