6 is the Magic Number
At last! There were a couple of sacrifices, but I've gone all 6.2! This is the first Leafish site to go live with Drupal 6 (although we do have a big Drupal 6 project in the works) so I've made some notes on the process, and a couple of hurdles I not so much overcame as simply ignored for the time being. Props to all those that have helped get the working modules below up to date.
Resources used:
- Converting 5.x modules to 6.x documentation.
- Converting 5.x themes to 6.x documentation.
- List of contributed modules status - version 6.x.
- Drupal 6 API documentation.
Read past the break to see how I got on...
Modularity
As I've done before upgrading our sites I began by listing the site's modules in categories: Required, Wanted and Meh. Several tens of tabs open to Drupal projects later, I could easily to move any module from these lists into a Sorted list if we have an official version or 6.x-dev branch. Also, lots of maintainers have been on top of updating their project pages with information about porting to Drupal 6. After all, there's a lot of people with getting their sites updated on their minds.
If there's no official version or 6.x branch, a quick check of the issue queue might glean some information. Patches are floating around, and it can be just as useful to find out a module is struggling - and as such replace (many older Drupal modules' functionality can now be replicated using just core or newer, fancy-pants modules like Views and Panels) or help port.
Anyway, the following modules are, if not an official release, a stable dev/alpha/beta and are active and working on this site:
- Administration Menu - 6.x-1.x-dev version available and working OK.
- Devel
- Facebook status
- Firestats - we're starting to play around with Firestats at Leafish. Yummy.
- Markdown with SmartyPants - still my favourite input filter
- Mollom
- Pirate filter - this one was on the Meh list, but its been updated so yarrrr!
- Pathauto
- Tagadelic
- Token
- Views - beta 2
The Sacrified
Those required modules which aren't ready yet ended up sacrificed... luckily there wasn't anything too vital:
Inline
Really, the only module I'm actually relying on which hasn't been updated (although there's a rough and ready patch available). I seem to remember this being a sticking point in between 4.7 and 5.0, so what's going on? Can it really be that hard to come up with a simple way of inserting an attached image? Inline module has a lot of flaws (such as not using proper filtering to achieve its string replacements, meaning <img src="/sites/paul.leafish.co.uk/files/blah.jpg" alt="blah.jpg" title="blah.jpg" class="inline" width="150" height="121" /> tags get shown, for example, in RSS feeds. Inline API hopes to address this and plenty of other inline woes, and good luck to everyone helping on that, but every time I look at an Inline-related issue, my head starts to hurt. How about:
- Enter
<img src="/sites/paul.leafish.co.uk/files/blah.jpg" alt="blah.jpg" title="blah.jpg" class="inline" width="150" height="121" />tag in content. - Replace with
<img src="$path_to_attachment_1" class="inline-left inline-thumb" /> - Write some CSS
I might actually do that, in fact. Until then, my older content will be smattered with [inline] tags. Rant over.
XML Sitemap
Another great module which needs some help. Check out the Drupal 6 port issue.
Taxonomy context
I mainly used this module to insert a taxonomy term's description to the top of term listings. However, the module's maintainer has asked for help testing the relatively new 5.x-2.x-dev branch, with the intention to port to 6.x once an official 5.x-2.0 release is reached. Port to Drupal 6.x issue.
Somewhere in Drupal's development, the standard term description field stopped being used for display on taxonomy listings. This has since been resolved and so I can use the core term descriptions with a pinch of CSS:
/* term descriptions */ .taxonomy-term-description { margin-bottom: 1em; padding: 0.8em; background-color: #eef1d9; border: solid 1px #e2e6c9; }
Taxonomy Context also provides a list of all term descriptions within a vocabulary. I have been able to achieve this with a Term view - click on articles in the main menu to see it in action. Once set up, the view simply needed some styling:
/* articles view */ .view-articles .item-list li { list-style-type: none; background-color: #eef1d9; border: solid 1px #e2e6c9; margin: 8px auto; padding: 8px; } .view-articles .views-field-name { font-size: 1.4em; }
Meh
Other modules that got dropped:
- Flickr - alpha version available, seems to be suffering from the same
server can't issue HTTP requestsas the coreaggregatormodule: see below. - Site menu - no sign of activity for some time. This module wasn't really neccessary, so it got dropped for the time being.
- Tables Filter Module - was using this for a single article containing a fairly complex table. Editing the wiki-style syntax was perhaps more confusing than HTML, so I re-edited the node in question. There has been little activity in this module's issue queue - there is still an open issue for a Drupal 5 port.
- Video filter - this was on my site purely for testing reasons, but its worth pointing out there's a brand spanking official 6.x-2.4 release available.
My modules
There is only one custom module present on this site: Random Slogans - s simple module to randomise my site slogan once in a while. I'll include any worthwhile notes on the update as soon as I get round to it.
Upgrading
- took the site down into maintenance mode.
- emptied any database tables that can be emptied, eg caches,
watchdog,session. - optimised all the tables to remove overhead.
- Backed up the database.
- Backed up any relevant files - in my case I just needed the contents of
/sites/paul.leafish.co.uk. The joy of a multi-site setup. - disabled modules and themes correctly.
- replaced Drupal 5 core with Drupal 6.
- allowed free access to updates via the
$update_free_accessdirective insettings.php. - hit the update script.
- re-enabled the theme.
- re-enabled the new versions of each module in turn.
- set
$update_free_accessback toFALSE. - brought the site back on-line, out of maintenance mode.
Upgrading issues
Thankfully, the entire process took about two hours and was relatively painless. There were some problems:
- Single failure on core update, I retried and there seemed to be no issues finishing the update second time around.
- Core Feed aggregator and contributed Flickr modules are suffering from an
The server can't issue HTTP requestserror. D'oh update. This is resolved once the site is out of maintenance mode. - All my pager links are marked active - this could be my (very old) theme: see below.
- The main Navigation just wouldn't turn on. Then when it did, I had to reset the title a couple of times. All this seemed to sort itself out eventually: probably just some caching badness.
My theme
Again, no real issues here. I added the .info file, with regions and removed the hook_regions definition from template.php. Drupal, the theme or the cache got a bit confused here, but as I'm not doing anything special with regions I reverted to using the standard Drupal regions.
I stripped out some old code from template.php which wasn't really necessary any more and added the required hook_theme to template.php:
function pablo_theme() { ), ); }
as the only thing I'm re-theming is aggregator items in order to insert icons based on category. Whilst on this, I also ensured pablo_aggregator_block_item was correctly named, not phptemplate_aggregator_block_item.
The pager looked shocking, but that could be my theme. I've noticed that each pager link now is given the active class. I assume this is because they are linking to the current or active page (ie node) but with different query parameters. Not sure whether this is a bug yet, or simply another problem with my creaking theme.
So, lo! A working, if tired and shabby, Drupal 6 theme. This theme has been mashed from Internet Jobs and various other places, and has been bastardised, chopped up, broken and re-assembled over four major versions of Drupal now (4.6 through 6). I think the next personal project for my site could well be a new theme based on the wonderful Zen project.
Once it gets ported to Drupal 6.x, that is. Ah ha ha ha.





Comments
Update: Flickr, Inline and Zen vs Hunchbaque
Your Inline link is broken.
Your
Inlinelink is broken. It was linked tohttp://drupal.org/project/inineinstead ofhttp://drupal.org/project/inline. Nothing much. :)Fixed
Thanks!
Post new comment