November 2008

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:

Tags: 

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!

Tags: 

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.

Tags: 

Problems with Drupal 5 - database table sequences/counters

A key design flaw in Drupal 5, especially for anyone dealing with large quantities of data, is that it doesn't use the database's built in auto-incrementing counters for its table primary keys, instead it manually tracks an per-table integer in a table called "sequences" which is updated each time new records are added. This is a bad design in all sorts of ways and really should have died a horrible death many years ago.

Tags: 

Rails tip: restful_authentication without a username

I've personal never understood the point of having a username for web sites when 99% of them also require an email address that is unique to you - just use the email address! In the world of Rails development many developers use the excellent restful_authentication to provide the user login structure, but again out of the box it uses a username. Silly thing. So instead, here's how to make restful_authentication sit rather happy with just an email address.

Tags: 

Overriding CSS can be a pain

One of the difficulties with Drupal is that with so many modules needed to make a good site you can end up with a dozen or more different CSS files. On occasions when you need to tweak the CSS to match a specific design, or fix something for IE6, it can take quite a while to dig down to the exact definition you need. You might try throwing random snippets of CSS at the problem to try to make it go away, but they usually won't work.

Tags: 

Don't take your iPhone abroad

A simple statement for you: unless you have AT&T stock, don't take your iPhone with you when you go abroad. If, for some crazy reason you decide you moost haf eet, at least do yourself a favor and:

  • disable data roaming
  • disable 3G

You may also want to enable Airplane mode, just to be sure.

I say the above after having returned from two weeks in Ireland. Before we left we signed up for the 20mb international data plan and international roaming. What we didn't do was:

Tags: 

Drupal modules: release early, release often (please)

Something I see quite a good amount of with Drupal modules is a tendency to hold onto fixes committed to CVS for some time. I believe this is counter productive. While yes, it is good to hold onto new, big features until they have simmered for a while and proven to be stable, smaller updates and especially bug fixes, should be rolled out regularly.

Tags: