Upgrading Drupal 6 to Drupal 7 Using Git

The Drupal UPGRADE.txt file and upgrade handbook page provide a lot of good information and procedures to perform a major upgrade (ex. 6.x => 7.x).

However, if you're looking to manage your Drupal 7 installation using Git, the upgrade guides don't provide Git-specific advice.

Here's a procedure I found useful when upgrading Drupal 6 to Drupal 7 using Git.

First, clone the Drupal 7 git repository using this :

git clone git://github.com/drupal/drupal.git

Drupal 7 Views 3 column names must be lower case

I'm just getting my feet wet with the Drupal 7, Views 3 hook_views_data API which describes a table to Views.

I had a table like this :

create table tbl(
  myid    varchar(30) COMMENT 'Primary key',
  myPrice float

I was getting an error of this form when I was trying to display the view :

Undefined property: stdClass::$tbl_myPrice in
 views_handler_field_numeric->render() (line 75 of 

Renaming the table to my_price solved the problem.


Drupal 7 - bootstrap.inc

bootstrap.inc (2,700 lines) includes functions that are available on EVERY Drupal request.

Here are some highlights :


- Minimum PHP and MySQL versions, minimum memory

- Logging levels

- Bootstrap phase definitions

- Human language initializations


- Micro timer functions

- Establish configuration directory

- Initialize Drupal settings (including setup of globals)

- drupal_get_filename (modules, themes etc.)

- Get and set persistent variables


Drupal 7 Developer Guide Book

The nice thing about good open source projects like Drupal is that the source IS open. This is one of the best ways to learn about how the software works.

You can buy and read one of the many books about Drupal, but since the Drupal source code is so well commented, you can learn a lot simply by reading the source code.

Also, since the code is of high quality, it's a great way to learn how to improve your own coding techniques.

Here's an annotated guide to some of what I see as some of the most important parts of the Drupal 7 code base.


Themes for Drupal 7

Drupal 7 (D7) hasn't been released yet, but there already are some themes compatible with D7. Here are some of them :

- Forest Floor - OK - kind of gray

- Dingus - Mostly CSS - no custom PHP

- mulpo - Clean and interesting

- Moleskine - Nice and rustic - derived from Basic theme

- NineSixty - Kind of plain

- AD Blueprint - Looks OK - clean

- AD The Morning After - Clean, spartan look

- Abessive - Unique, but a little too stark

- Basic - Based on Zen theme. Allows you to use Skinr module and SASS CSS.

Subscribe to RSS - Drupal7