Solved

Upgrading Drupal module from v4 to v6

Posted on 2011-03-07
2
331 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

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 …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

803 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