.: Content Management Systems
.: Removing Drupal URL aliases
We use Drupal as the basis for our intranet at work. With time we noticed that it took longer and longer to load individual pages. Part of the problem was tracked down to the number of url aliases in use: around 1500. The majority of these had been generated using the pathauto module. Apparently the slowdowns associated with url aliases has been fixed in Drupal 4.7 and a patch exists for 4.6, but this was not known and the heavily customised code we use can be difficult to patch.
I wanted to search for and replace the custom urls across the site with their original Drupal urls. Taking advantage of MySQL's REPLACE command I wrote the following PHP script, designed to run on the command line (PHP-CLI), to get the list of url aliases and systematically replace them in the database. Note that the tables and fields that need to have the replace performed upon them may vary depending on your setup. For instance, we used a custom teaser field in the node table.
.: And I thought we were supposed to be at the leading edge...
I'm seriously frustrated by work at the moment. I am supposed to be working for a world leading ICT research centre, yet I am being told that our intranet should be using technology from 2000 and before. My boss wants static web pages so he can tweak every little bit of appearance (using <font> tags, of course). He couldn't give damn about maintainability or clean HTML - so long as it looks exactly as he wants it.
Replacing the static page intranet with the Drupal content management system saved me at least two days a week in work. Okay, it hasn't been all roses, creating vanity url aliases for each page has slowed the system to a crawl and the navigation needs cleaning up, but it can be done, if I have the opportunity to do so.
I have used the additional time to develop web applications, such as software and conference registration systems. "IT should do that" was his reply. Yeah right. It's hard enough to get properly functioning web servers, let alone custom applications. Ideally, IT and communications should work together on such things, which is what happened before they centralised IT services.
.: Intranet Content Management Systems
Last year I moved the work intranet from a static web site built with Macromedia Dreamweaver and Microsoft FrontPage and running on a Windows IIS server to Drupal and hosted on a UNIX/Apache server. The intranet consists primarily of documentation, which is fairly static content, and news and event listings, which are constantly updated.
The manual process of adding and archiving news items and preparing the weekly newsletter was a labourious task in the initial static site. Other difficulties encountered with the static site included problems administering permissions (all done via FrontPage) and changing shared items across the intranet. Dreamweaver tended to crash when it attempted to update library items across the entire site and even updating subsets of the site could be very slow.
.: Upgrade update
A lot of stuff doesn't work any longer after the upgrade. It seems like a number of my photos are missing and I don't like the new image gallery function. I may consider writing a new module myself as Drupal version 4.6 Image Gallery is unsatisfactory for work as well.
I've reenabled anonymous comments. We'll see how well the new spam module works. Too much abuse and I'll have to consider permitting comments only from registered users.
.: Late nights of cricket and programming
it was strange watching the sunset over the England-Australia one-day cricket match on TV, and the sunrise out the window. I always associate cricket with summer, which it is in England, where the matches are being played. Yet, winter has suddenly hit Sydney with a vengeance. It confuses me!
At least the cricket provided background entertainment while I continued my all-night struggle to write a content management system from scratch for the ICT Centre by July 1. I spent yesterday working from home in the hope of being able to concentrate, but as usual, was bombarded by a constant stream of highest priority minor tasks. The only time I can focus on actual programming is the night, when everyone else has gone to bed. Hence over the past fortnight I've gone without much sleep. And I also need to finish setting up the new Drupal based intranet by July 1 as well!
.: First infection of a PDA by a human virus
I was viewing a web page about tetanus vaccines on my Zaurus C700 Linux PDA when the machine froze. I rebooted it, it hung during the process, tried again, hung again. Tetanus paralysis taking hold.
After the next reboot attempt it refused to switch on again, the LED's just kept blinking. Tried again and again hard rebooting, pressing D+M . Got to the service menu once, but an attempt to reflash the NAND using a backup just lead to the message format failed.
I think I've "bricked" my wonderful Zaurus with bad NAND memory blocks and a corrupted bootloader. :( Now I"m really glad I decided to return via Japan for our next trip. Have to start saving now!
The forums here were useful diagnosing the problem and populated by very helpful people.
.: Drupal 4.5.0RC
I'm trying out the latest version of Drupal. At the moment some things may not work, especially as some modules are not yet ready for 4.5. My old theme also caused problems, so I'm using a default theme until I can create a new one.

