Solved

Upgrading Drupal module from v4 to v6

Posted on 2011-03-07
2
332 Views
Last Modified: 2012-05-11
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
Comment
Question by:iluomo227
2 Comments
 
LVL 13

Accepted Solution

by:
Carl Bohman earned 125 total points
ID: 35070523
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
 

Author Closing Comment

by:iluomo227
ID: 35072383
My question was very open-ended, though I felt the answer gave me the framework I needed to move forward.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for those that are having major problems with users upload files such as pictures to their profile. The solution is simple and has to do with correcting the directory paths. With some experimenting and testing i got it fixed. Note…
RTL (right to left) web applications aiming for audiences speaking languages like Hebrew or Arabic, are generally more complicated than the same applications aiming for audiences speaking Latin based languages. The main difference lies of course …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question