Solved

Upgrading Drupal module from v4 to v6

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

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 …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now