jQuery And Drupal 6: A Delicate Balance

Drupal logo
For Drupal 6 site owners, balancing a Drupal jQuery release point along with your jQuery plugin version requirements is a delicate matter. Here we look at some problems that can result and what to do about it.

If you ever ran into issues with your Drupal administration interfaces or in your site functionality involving jQuery components, you're not alone.

The issue at hand is that Drupal 6.19 (as of this writing) ships with an ancient jQuery 1.2.6 version that is 18 months outdated. Because of this, you may find quirky behavior and functionality problems.

Lets say for example you use a jQuery component such as the fine jQuery Tools Scrollable widget. You decided to upgrade your jQuery to the latest version by replacing /misc/jquery.js with version 1.4.3 (current at this time). While you'll find that your Scrollable will work, some parts of Drupal will no longer work.

I've found the following problems in this regard:

  • Menu icons are missing making it impossible to move menu order
  • Adding extra items in poll nodes is not possible
  • XmlSitemap appears to hang when doing batch updates

And the list goes on.

Using jQuery Updater, the Drupal module, will not solve your problems because at this time, all it does is use a jQuery 1.2.6 version.

jQuery Updater 2.x development version can be used. It uses jQuery 1.3.2 which is still considerably behind releases but nonetheless is an improvement. Still, if your jQuery plugins use a version higher than 1.3.2 you are still left holding the bag.

All in all, I think its fair to say that Drupal 6 jQuery support is lagging and won't be addressed anytime soon until Drupal 7 comes out.

By then, Drupal 7 will have jQuery 1.4.2+ support and this will no longer be an issue at least as long as development teams promise to update to the latest jQuery moving forward.

Frankly, I think it is overkill to have a module to handle jQuery versions, especially if it amounts to a site administrator just downloading and overwriting the jQuery file. Your theme templates are going to have references to that file so whats the big deal...


ASO ad


Filed under: