Shaw Solution
Feb 12

Upgrading the site 2012

Non-nerd readers may want to skip this post, as it is about the CMS upgrade to the website and the changes it brings

For the past nine months, I have been trying to upgrade the website from Drupal 6 to Drupal 7, and been going through a lot of pain doing so. There was a critical bug due to the Locale module which was preventing the issue. Having finally identified the issue and resolved it, I discovered that on one occasions I'd failed to properly restore the Drupal 6 database! This meant that a Drupal 7 upgrade failed because of duplicate tables. After trying an assortment of things, I created a fresh Drupal 6 database with all my modules enabled so it was clean and functional, and then imported the data only for each table that existed. Once this was done(and backed up!) the upgrade was run, and a couple of additional tables were identified. A restore to the previous position and creation of those tables finally allowed a Drupal 7 upgrade!

The main issue since that point that has consumed my weekend (approximatly 20 hours between Friday evening and Sunday) has been that Drupal 7 does not support images in the same way as Drupal six so all attached images and gallerys were not longer valid. I took this as an opertunity to make some fundemental changes to the site.

Key Improvements:

Drupal 7 Codebase: Obviously, the site is now running on Drupal 7 and has all the advantages that that offers.

New Gallerys: Using the Galleria module and the Views Module, I was able to implement themed galleries (images can also be shared across multiple galleries by tagging when adding). These galleries are much nicer to look at than the previous HTML grid and lightbox2 implementation that was used on the Drupal 6 site and allow me to give a better experience for handling images. This is achieved by having two linked view types. Gallery Image view which is a new content type with 1 attached image, so each image has its own node and Gallery, which is selected by the Gallery Image and shows in a JavaScript Galleria all the Gallery Images associated with it. Additionally, Galleria has some 'hidden' functionality which can be enabled that allow tablets to swipe to change images and doubletap to go full screen.

New Guides: At various points, I had written blog posts that were more like "How To's" on areas of photography. This is something I'd like to do a bit more of and its something I find useful for myself when I'm going back to a type of photography that I've not done in a while. Rather than having them in the Blog, like I had done before, these have been moved out into a new content type of their own, so they can be reviewed as intended.

Improved Info Section: This was pretty much a holdover from my previous website, back when it was pure HTML, it didnt look or read like it was part of the main site. I still need to update some of the content, but its been moved to its own template and will have things like any books I publish as well as the basic site information.

Database Cleanup: This site had been my first experience with Drupal, and I have learned a lot in the last few years about running and managing a site like this. In the Database, aside from the errors from the failed upgrade, there were a range of tables and data that had not uninstalled properly or otherwise failed and were cluttering it up. The awkward way the upgrade was achieved actually was helpful in that regard.

File System Cleanup: Much like the Database clean-up, I took the opportunity to clean up how the images and other documents were stored. rather than all being in one big directory, cluttered and unclear, they now each have their own sub-directory.

Misc There were also a range of small improvements I implemented that I'd been thinking about for a while, like a better set of Social Media icons on the right hand navigation bar MySiteMyWay. I also setup some default images to ensure posts that don't have attached images still present properly and consistently.

About the Author:
A passionate photographer who is unable to settle on a particular type of photography. Primarily shoots with a Canon 5D MKIII, a 1D MKIII and occasionally with a GoPro Hero4 Black.

Leave a comment!