Solved

Upgrading Drupal module from v4 to v6

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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 …
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

929 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

12 Experts available now in Live!

Get 1:1 Help Now