Radarearth.com

Drupal Web Development.

Radarearth.com Upgrades to Drupal 7

Tue, 04/19/2011 - 03:50 -- Ben Hosmer

After carefully following the upgrade instructions from drupal.org to upgrade from Drupal 6 to Drupal 7, I dove right in.

Karen Stevenson from Lullabot also has an excellent article that provides some very good detailed help on the upgrade process as well.

The first task I had to do was disable all of the contributed modules that I had been using on my Drupal 6 site. This included Apture, although I am working on upgrading it to a Drupal 7 version soon.

Some of my other modules, like image assist didn't have a Drupal 6 release, but I didn't really need it since images are now standard in core.

Image assist allowed quick insertion of images into the body field of your node.

Instead, I used the core image handling capabilities, along with the insert module to handle the image placement in the blog. Don't forget to set your image field visibility to hidden or the image will show twice. Once for the image field, and then again from the insert module inserting the image.

All in all, most of the upgrade went relatively smoothly with a few minor hiccups.

The first, was this error: Notice: Undefined index: required in field_default_form(), when editing content from a content type that I had imported.. This was quickly solved by a search on drupal.org, where I found comment #21:

Posted by anselm.marie on December 30, 2010 at 12:33am
Ok something strange just happen but in a good way and I need someone to confirm that this works. Follow these steps:

1. Click on Structure > Content types.

2. Click on manage fields for either "page" or "story".

3. Create a new field. Label -> "test", Name -> field_"test", Field -> "Long text and summary", Widget -> "Text area with a summary"

4. Hit save. Now go to an existing story/page or create a story/page.

5. At this step the errors disappeared for me. Go back to the field you just created and delete it.

6. Return back to an existing story/page or create a story/page. The errors should still be gone.

I did this for both story and page nodes and it worked. I hope it does the same for you.

.

The next issue I encountered was that some block functionality was not reliable. On the homepage I have a few blocks to show recent comments and recent drupal news, and their visibility is set to <front>. After navigating away from the front page though, I hide these blocks. I found they were still visible despite setting them to only show on the front page.

The solution to this issue was to change one of the select boxes, save the block, and then go back and set the visibility to what I wanted. This remedied my issue.

The next thing I really wanted to do was upgrade the current theme to something a little more modern. Drupal provides an almost instant method of changing the look and feel of your entire site through the use of themes.

I had always wanted a reason to try out the Omega theme system and recently heard and interview with the project maintainter, Jake Strawn (@himerus) on the Drupaleasy podcast

My old theme worked well, but I wanted to upgrade it and found the omega framework enjoyable to work with.

The old theme I was using was a sub-theme that I had created of acquia slate:

I wanted to maintain some of the elements that I had in my previous Drupal 6 theme, and Omega allowed that.

After the upgrade, I verified that all of my content was present. Then it was time to start enabling and configuring the contributed modules that I would need.

I could also use the New views module!

I have some standard modules that I install on every site. You can get my .makefile from my views gives you the ability to sort and list your content

  • Omega is the awesome base theme that allows you to create your own theme quickly
  • Omega Tools is a companion to drush and omega that allows you to quickly create a sub-theme
  • Module Filter adds a nice search box and organizes your installed modules
  • Environment Indicator adds a nice red tab on your site to let you know what site you are working on
  • XML Sitemap automatically creates an xml site map of your site and submits it to search engines
  • Mollom provides spam protection
  • Fast permissions access is like module filter for permissions
  • Add to Any adds a handy social bookmarking and linking widget to your site
  • Path Auto adds a more human-friendly url to your nodes. Instead of /node/123 you get /title-of-post in your url
  • Navigation 404 adds your menu back to your "404 not found" error page to help users get back
  • Comment Notify allows users to subscribe to posts. Even anonymous users!
  • Media allows you to easily create image galleries for your site
  • Insert allows you to quickly insert images into your posts

    If you use Drush you may encounter some issues with the automatic installation of some of the modules. I found uninstalling the modules, and then manually adding them eliminated the errors I was receiving.

  • Add new comment