Drupal Web Development
Check List for Upgrading from Drupal 5 to Drupal 6
Includes Upgrading Drupal Modules, Themes, and Site
I am a fan of check lists. They help simplify and improve the effectiveness of repetitive processes over time. The following is a recent check list I shared with a client as a summary of the process used to upgrade from Drupal 5 to Drupal 6. Please feel free to use it and add your own notes.
- Together with client identify the list of key content and expected behaviors/displays. Includes any publishing/business logic.
- Should be approximately 30 or so check list items, with accompanying screenshots where appropriate.
- This will form the QA test script to confirm the quality of the upgrade and will be the list for acceptance testing.
- Duplicate the site, code, db, and files into an upgrade branch on dev server.
- Version control all code, db, view exports, ect. throughout the process
- Confirm there are no custom hacks on Drupal core.
- Run the upgrade process for Drupal Core.
- Test
- All steps titled test include some automated testing as well as use of the coder module.
- I also just came across the deadwood module.
- Test steps also include running through the QA test script when appropriate.
- See links below.
- Run the upgrade process on views, converting views to views 2
- Test
- Identify any custom hacks on contrib. modules.
- Upgrade contrib. modules which have D6 versions
- Test
- Identify upgrade paths for non standard modules and those which do not have a d6 version
- Code the upgrades and run them
- Test (full developer review)
- Client QA and site review/Bug fixing Cycle
- Prepare deploy plan
- Deploy the upgrade on production server
- Client QA and site review/Server Configuration and Bug fixing Cycle
- Client Acceptance testing (walking through the script), reporting and fixing issues cycle
Links About Upgrading Drupal
Converting 5.x modules to 6.x - http://drupal.org/node/114774
Updating Drupal Modules to D6 in Three Easy Steps - http://www.webmasterworld.com/content_management/3...
Coder Module - http://drupal.org/project/coder/
Deadwood - http://drupal.org/project/deadwood - http://boombatower.com/tools/deadwood
Recent Project: House Democratic Caucus New Website
While contracting for the Tree House Agency last fall, I am very happy to have architected, project managed, and lead the development of the New House Democratic Website (http://dems.gov)
From: http://www.dems.gov/press/house-democratic-caucus-launches-new-website
The site features what Democrats are saying each day, by issue and about major legislation. For the first time, visitors will be able to easily find quotes from Members on the topics and legislation they care about most. The site also features major legislation passed by Democrats and summaries of upcoming bills. In addition, the public can find House Democrats’ official websites, YouTube channels, and Facebook pages using an interactive directory.
The new site allows the caucus to:
1. Aggregate content from congressional members (video, text, feeds, and other forms of media)
2. Share content with the public and reporters in a way that it easy to navigate
3. Provide multiple views for visitors to browse and search content by facets of interest
Of course we built it in Drupal for the public facing website because of its ability to present content to visitors in a variety of ways; with all the social networking tools of today’s websites and Drupal on the administrative end was the clear choice when it came to meeting the administrative and security needs of the Caucus.
![]()
Technical Issues which Pop Up in the New Year
Nice post on Smashing Magazine reminding us not to forget the small stuff in the new year: http://www.smashingmagazine.com/2010/01/23/dont-forget-the-small-stuff-this-year/ . For example, did you change the copyright date on all your clients’ sites?
Here are two interesting client issues I had in after the New Year.
Expired Security Credentials
A client called to ask for help getting access to an old Content Management System they had for about four years. The site just stopped allowing them to log in. Turned out to be the site was on a Windows Server which authenticated via the Windows User Groups. After four years, the server reset the user account privileges.
The lesson: Watch server configs and security accounts in the new year. They often (correctly) expire after a certain period and this often occurs at the start of a new year.
CCK Date Fields Stopped Working
Here’s one for us Drupal CCK Date field users.
One of my clients has a content type which includes a publication date using a CCK Date field. Suddenly, they could no longer save changes to nodes in this content type.
This was the error message:
An illegal choice has been detected. Please contact the site administrator.
Here’s what happened:
The CCK Date field has a setting called, “Years back and forward.”
DataTables (table plug-in for jQuery)
My new favorite jquery tool for data table sorting and searching.
Excellent tool with as little or as much configuration as you'd need for most any project. Very slick.
Notes to Developers
I've been both developer and manager for years on both large and small projects with various sized teams. During the week to week management of these teams I tend to send little notes to help guide our work process. This week I have been breaking in a new team.
I thought it might be useful to other technical project managers and team leaders if I shared some of this week’s raw notes. I hope it’s useful for other managers to have a glimpse into the day to day notes of another in their same place.
Time Sheets
Please enter your time regularly into Fresh Books. Smaller more frequent time entries are preferred. Try to break them down by tickets and tasks in those tickets. Please always include the ticket number you were working on.
Please keep your entries up to date daily while on a project.
SVN
I believe in update and commit often.
Make sure you update and resolve conflicts before committing.
Enter in notes about what you are committing and when possible, enter the relevant ticket number.
Commits will auto deploy to the server within a few minutes. If you break something, you can roll it back but email the rest of the team to let us know so we can make sure to match our revision to the latest version on the dev server.
To roll back, log into [Spring Loops], choose the project, and then deploy the previous version number.
Remember that other devs are working in SVN too. So, update often, typically before starting a new change set. And commit often. I can help with any merging issues if you need it.
[Info here on how to contact me for an urgent need.]
Further Notes on SVN
The following is just a brief reminder about steps to take to not over write others work.
Where and How to Start using jQuery to Enhance your Drupal Site (jQuery Mini-series Part 3 of 3)
If your are not a jQuery dev, don't worry, there are plenty of excellent resources to get you started using jQuery to enhance your site.
Star here
http://drupal.org/project/Modules/category/101 ( Drupal Modules: JavaScript Utilities )
Then simply:
- Browse
- Download
- Install & Configure
Some module which I recommend checking out
UI Improvements
- jTooltips: http://drupal.org/project/jtooltips - adds in context user feedback
- JQuery Interface: http://drupal.org/project/jquery_interface - might not be D6 ready
- jQuery UI: http://drupal.org/project/jquery_ui - a full library of effects
- Username originality AJAX check: http://drupal.org/project/username_check - This is the kind of enhancements jQuery is perfect for.
Content Browsing
- jCarousel: http://drupal.org/project/jcarousel - nice for creating a recent post/image browser, or a headlines browser.
- Also see @ http://drupal.org/project/jcarousel_block
- Also see @ http://drupal.org/project/jcarousel_block
- Views carousel: http://drupal.org/project/viewscarousel
Photos
- Thickbox: http://drupal.org/project/thickbox or Lightbox2: http://drupal.org/project/lightbox2
- @see Comparison of “lightbox” type modules: http://drupal.org/node/266126
- @see Lightbox2 demo http://www.stellapower.net/lightbox2
- Slideshow Creator: http://drupal.org/project/slideshow_creator
- @see Cool demo here: http://www.malsup.com/jquery/cycle/
Theming and Display
- jQuery Eye Candy: http://drupal.org/project/jq_eyecandy - if you really must use jQuery rather than CSS
- JavaScript Theming: http://drupal.org/project/js_theming
- Page Style: http://drupal.org/project/pagestyle - a style changer in a block and in the browser for better Web Accessibility
jQuery Plug-in Management
- jQuery plugins: http://drupal.org/project/jquery_plugin - call jQuery plugins from any module or theme by calling the jquery_plugin_add($plugin) function
- jQuery Plugin Handler (JQP): http://drupal.org/project/jqp
Drupal Best Theming Practice for where to put JavaScript (jQuery Mini-series Part 2 of 3)
In D6, you can put a .js file in your base theme directory and it will automatically be loaded by Drupal.
You can also include a js file via an entry in your theme’s .info file:
scripts[] = your_javascript.js
However, I recommend the following:
Consider your JavaScript theme-able like HTML.
- It should be able to be themed
- Put JavaScript in .js file
- Use drupal_add_js() in a theme function
- If in a module, call it with hook_init()
As HTML in a theme function / tpl file, calling your JS with a theme function allows theme developers to modify or override your JS in the theme layer.
Here it is in a module:
<?php
/** * Implementation of hook_init() */function trickoutmysite_init() { theme('trickoutmysite_javascript');}
/** * Implementation of hook_theme() */function trickoutmysite_theme($existing, $type, $theme, $path) { return array( 'trickoutmysite_javascript' => array( 'arguments' => array(),),
);
}
/** * A themable function which uses drupal_add_js to include the js file */function theme_trickoutmysite_javascript() {drupal_add_js (drupal_get_path('module', 'trickoutmysite') . '/trickoutmysite.js');
}
?>
When to use jQuery on your site (jQuery Mini-series Part 1 of 3)
Use jQuery to Enhance Site UI, Display, or Interaction
jQuery is an excellent tool for improving your site’s interface. It’s also helpful to target and change specific CSS and HTML elements quickly. [1]
I tend to use it mostly for UI (user interface) enhancements or when there is a semi-dynamic event in the display, after the page has loaded.
Examples uses include:
- User feedback in messages
- Tool tips (in-context user guidance)
- Enhanced image/gallery display
- Tabs for quick access to hidden information
- As a style sheet switcher (helpful with accessibility)
- Form enhancements and client-side feedback
- Menu enhancements
- Data entry such as a date picker
- Table and data sorting
- Media players
- Content flagging
- Tagging (better input methods)
- Loading additional content without a page refresh
- Dynamic Charts
- Content Carousels (albums, photos, headline news stories)
Do Not Use jQuery as the Primary Driver for Site UI, Display, or Interaction
jQuery should not be used as the primary driver of your site’s display and not as a cornerstone of any primary functionality for your site.
In other words, sure, enhance your web sites e-commerce process with jQuery, but have it:
- degrade gracefully,
- making sure people may still go through the e-commerce process,
- even if jQuery fails completely.
Simple uses can have big impact
When consider the rendering of display effects such as rounded corners and color gradients, consider CSS instead.
If Drupal is "free", what are professional Drupal development budgets based on?
With Drupal being an open source software and having such a great set of features right out-of-the-box, people may wonder what they pay for when going to an expert Drupal developer or shop for their Drupal install.
A good Drupal site may cost thousands of dollars. For an enterprise level site the budget may be in the hundreds of thousands of dollars. What’s that all about? I thought Drupal was “free”. The following is a bit of explanation.
Most web site features are already built into Drupal and ready to be configured. With professional Drupal development you are not paying for features, but rather expertise. What expertise?
Professional Drupal developers and shops offer expertise in Drupal site:
- branding and visual design
- theming (to be defined below),
- feature integration,
- architecture,
- scaling,
- optimization,
- and security.
What are professional Drupal development budgets based on?
Not Just Features
As Drupal’s base install already has a large feature set which will meet many site’s needs, it is important to note that there are actually very little features lost or gained at budget levels past a certain point (the cost of install, setup, and deployment). What budget levels do affect, that is, what is lost or gained are levels of feature integration (interaction) and design implementation (theming).
Theming
To meet real business branding and marketing objectives, companies need their professional visual design developed into Drupal in a way that effectively and successfully communicates their brand.
Planning your migration to Drupal
I'm often asked what's involved in migrating a site to Drupal. The following is my typical answer (when responding in writing) . I hope this helps both clients and Drupal service providers in their next planned migration to Drupal.
In general migrating a site and upgrading to Drupal involves the same process as any other migration to a modern system.
Things to consider and come to your developers with include:
- A well defined vision for the new site (ideally agreed upon by all key decision makers)
- A set of business goals to meet
- An overall idea of desired traffic levels (which helps dev teams evaluate and plan the Drupal system set-up that will best meet your needs)
The following things are usually identified and developed along the way to building the web site. Clients generally come to me with some to none of these completed.
Looking for Drupal developers interested in occasional freelance work
I’m looking for Drupal developers interested in occasional freelance work.
As a (thankfully) busy freelancer myself, I’d like a small pool of good developers to help augment those weeks when the work is more than one developer can do.
I manage all the projects directly and coordinate the work via an online project management and ticketing system. If you are comfortable working this way, and can use SVN and other repos to code in a distributed environment, please contact me.
Various skill levels and expertise welcome (designers, themers, coders, Drupal lovers).
You may contact me by emailing developers [at] seanbuscay.com.
Please include information about your Drupal experience and your freelance rate.
I look forward to hearing from you.
Just read, “Everything You Know About CSS Is Wrong!
Just read, “Everything You Know About CSS Is Wrong!” http://www.sitepoint.com/books/csswrong1/
Most of the content may be easily found on the net.
What are the best practices for rendering different types of node displays?
The following post is an answer I wrote to a question submitted to Tree House Agency in preparation for Do It With Drupal (New Orleans 2008). Tree House has kindly given me permission to post this material on my own website.
Q: One node, varied displays?
BH asks:
What are the best practices for rendering different types of node displays?
Short Answer
Three methods immediately come to mind. These are:
1. Different TPL files for each type of node
2. Switching template files by path
3. Using CSS to change display by node type
Additional cases may include:
4. Switching by taxonomy term
5. Switching by role type
6. Switching by user id
Details
1. Different TPL files for each type of node
Drupal already has an excellent built in method for rendering different types of node displays.
Grab a copy of node.tpl.php from Drupal’s modules/node/ directory.
![clip_image002[8] clip_image002[8]](http://www.seanbuscay.com/sites/default/files/clip_image002%5B8%5D_eb42d4ce-7e4a-4a8f-845b-511bc02c8f31.jpg)
Put it into your site theme folder. Then rename it according to whatever node type you would like to customize. (node-nodetype.tpl.php )
Notes:
The node type should be the machine readable content type.
There are many places to find the machine readable name. One place is at: /admin/content/types
Dev snapshot of a CMS I wrote
The following are samples of database work I have done. I have attached a sql file as a sample. It is a dev snapshot of a CMS I wrote.
So you don’t have to just stare at sql statements, I have highlighted some points in this post. I will paste sections of the sql statements and then comment on them.
More about my theme for SeanBuscay.com.
I built a Drupal theme I call “chi”. It is based on the Yahoo! YUI Grids CSS foundation. Like the excellent “Zen” theme already written for Drupal, a Drupal theme based on Yahoo! grids CSS can offer an excellent starter theme for Drupal developers and themers.
I recently posted a summary on the benefits of YUI Grids CSS for Drupal theme developers on my blog. You can view it as a screencast, PowerPoint presentation, read a text summary, or download a PDF from this URL:
http://seanbuscay.com/drupal-web-development/yahoo-ui-library-grids-css-drupal-themers
I have included a zip file of the theme code at the end of this post for you to review.
I’ll highlight a few sections of the code and features in the screen shots below.
First, this is a Drupal 6 theme, which utilizes an .info files for themes. A number of theme elements can now be defined within a simple text based .info file rather than within the code of a template.php file. Here’s a screenshot of the included chi.info file.
Note that regions and theme style sheets may be defined in the theme.info file. One important catch is to define the CSS files in the order in which you would like them to load. They are like defining an array in PHP or Java. So, when including a file sheet which resets all fonts and html elements to a base starting point, and then including a style sheet which builds upon that base reset, the load order needs to be considered.

