[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 337
  • Last Modified:

Upgrading Drupal module from v4 to v6

I'm being asked if I can convert a v4 Drupal module to one that could be compatible with v6.  Anyone have any idea what sort of level of effort would be needed for this?

Thanks,
iluomo227
0
iluomo227
Asked:
iluomo227
1 Solution
 
Carl BohmanCommented:
There is a lot of documentation dealing with converting modules from one version to another: http://drupal.org/update/modules

Interestingly enough, there is no documentation in going from 4.x to 5.x.  Having never dealt with that old version, I can't say what has changed.  I would expect a fair amount of customization is going to be required, as Drupal has changed significantly over time.

The first thing I would do is create a basic (essentially empty) module using the 6.x format.  Here's a link for some documentation to assist: http://drupal.org/node/231276

Once the framework is there so that the module is at least recognized by Drupal (in your dev environment, of course, not on the production server), you have two choices: copy all the code and fix as needed or copy functionality over one piece at a time.  Either approach is going to have some advantages and disadvantages.  Depending on the size of the module and your personal coding style, pick the most appropriate approach for your needs.

In general, I would suggest that copying functionality is the best approach, as it gives you the opportunity to make it a truly 6.x module instead of a hacked 4.x module running in 6.x.  You also have the chance to better leverage newer code and moudles.

Don't forget that you may be able to delegate some of the functionality to other modules such as CCK, if appropriate.  This allows the module to focus on the new functionality instead of re-inventing the wheel.
0
 
iluomo227Author Commented:
My question was very open-ended, though I felt the answer gave me the framework I needed to move forward.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now