Hello,

I writen this module to convert Joomla! 1.0 to Drupal 6. It does the following:
- Only support clean Drupal 6 installtion
- Keep all Joomla! contents, users. Keep content item id unchanged (for SEO for example)
- Remove comments marked as spam (support only Jom Comment)
- New vocabulary for section/category
- Support mosimage
- Support some other features that I'm using..

It isn't widely tested. Just test with Joomla! 1.0.12, 1.0.15, Drupal 6.0, 6.2 on my localhost and another host, 4000 articles + 1000 users + 3500 comments without any problem. Only tested with utf-8 encoding. Only tested with PHP 5, 32 MB memory.

It was supposed to support SOBI2, mosetTrees... but finally I think it doesn't worth coding. So I release it now. joomla2drupal is derived from http://joomla2drupal.teodorani.com/ (which doesn't support D6) which is based on http://www.borber.com/en/projects/wp2drupal (support D4.7 only).

[April 1st 2009] Ah luckily now I can edit this page. So I update the link. You don't have access to my SVN (sorry) but there is daily export archive of the module: http://svn.jcisio.net/d/joomla2drupal.tar.gz
[Feb 2010] Another module to convert Joomla! 1.x to Drupal 6 (but I haven't tried it) http://drupal.org/project/joomla
[Oct 2010] I create a new project for this module at http://drupal.org/project/joomla2drupal. I'm seeking co-maintainer, because even I'm fixing bugs, I eventually no longer use this module.

jcisio.

Comments

jcisio’s picture

Hello,

I deploy some private module with that svn, so no anonymous svn access now. For download, please use: http://svn.jcisio.net/d/joomla2drupal.tar.gz

BR,
jcisio

DocMartin’s picture

Many thanks for this module!

I just used, after trying Joomla migrator component for 1.0.14 to 1.5. I'd already been thinking that may be best if could move to Drupal - but daunted by apparent difficulties - lots of faffing about with MySQL; when the Joomla migrator component gave me an error, had another look at info on migrating to Drupal, and found this nifty new module.

Just worked for me (once entered correct joomla database info!) - on a test, MAMP install on a Mac.
From database with mainly the default swedish (!) encoding, and with mos_ as prefix.

Impressive seeing all the free tags that have been generated - way too many perhaps, but can figure ways around this, if needs be; or may find that make for well cool tag cloud.
Users seem to be in without problem; already, deleted umpteen wannabe spammers who had signed up, and not so simply removed in Joomla.

Still got quite a bit to do, inc figuring how to get URLs the same as on my Joomla site (may just use manually created URLs; pathauto ones not quite the same - partly as w Joomla use the short item titles).
Also, importantly, want to sort Fireboard forum. Rather seems an approach could be to convert to SMF, and maybe use this via bridge; or move from SMF to phbb and thence Drupal [! - rather scares me, I must say, but may be worth it in the end]

One thing I'm looking forward to is using menalto Gallery properly. Later; for now, back to the test site. Fingers crossed this becomes good to go live.
____________________________
CheungChauHK 長洲HK - South China Sea island in Hong Kong (built w Drupal from the start)

____________________________
DocMartin and Hong Kong Outdoors

gav240z’s picture

I want to move from Joomla site and SMF forum to Drupal.

All my users are registered in SMF as Joomla is only used for front page articles. I think the only downside with the SMF -> PHPBB -> Drupal will be that user passwords are not easily transferred and as a result users will need to use the reset password facility in Drupal.

I would be interested to hear how you get on, as I don't plan on making this migration for some time, but would like to eventually.

ericinwisconsin’s picture

Let me make an suggestion: Keep SMF and use the SMFforum integration module to sync up your existing SMF site with Drupal. The integration works both ways, so you might lose some Joomla-specific user info, but from what you're saying, you didn't do much with the Joomla part of your site, as far as the user table is concerned.

gav240z’s picture

Yes but bridging got me into this mess in the first place. Ideally I want to migrate my users from my SMF / Coppermine bridge to Drupal. Migrating Joomla content would also be a bonus.

This way i can use 1 piece of software to manage what 3 pieces previously did. I've also read that the SMF / Drupal bridge has some issues.

tuaris’s picture

I don't know if you still need help, but maybe someone else will benefit from my post. I have written a script that can migrate Joomla Simple Boards to Drupal.

http://drupal.org/node/438124

It's released under the BSD license, so the author of this module is free to incorporate my work into this module.

richbaldwin’s picture

Great module. Migrated Joomla 1.0.13 to Drupal 6.8 no problem.
Oh yes, you have to change the following lines are per this comment:
http://drupal.org/node/249643#comment-1195313

I used this version:
http://svn.jcisio.net/d/joomla2drupal.tar.gz

 from: for ($i=0; $i<$num['article']/1000; $i++) {
 to:  for ($i=0; $i<$num['article']/100; $i++) {

and

  from:  for ($i=0; $i<$num['user']/1000; $i++) {
  to: for ($i=0; $i<$num['user']/100; $i++) {

and (didn't actually use this section myself)

from:     for ($i=0; $i<$num['comment']/10000; $i++) {
to:    for ($i=0; $i<$num['comment']/100; $i++) {

Very minor change. Once you make those changes ... perfect...

Thanks again.

bhanu123’s picture

.

bhanu123’s picture

I need a detailed explaination of how to migrate from joomla to drupal .
step by step procedure or any reference website ids are needed plz reply me

DocMartin’s picture

I've just posted some info that may help, at:
http://drupal.org/node/80195#comment-873315

- but as indicated, I've taken rather cumbersome approach I believe, as about clueless re MySQL (and php).
Maybe can help a bit; even if partly for what not to do!
____________________________
CheungChauHK 長洲HK - South China Sea island in Hong Kong.

____________________________
DocMartin and Hong Kong Outdoors

kollod’s picture

Hi. It`s a good module and works fine! I`ve imported all of my contents to Drupal succesfully. But there are a little problem with it that it creates one and only vocabulary "Topics" and puts all sections and categories as terms. We`ll I guess you`re aware of it :-) I have about 50 sections/categories and 3600 articles. It`s a big mess managing such many entries in Drupal admin! ... I also tried out another module http://drupal.org/project/joomla - But I also have some problems with this too (I`ve just posted Issue here http://drupal.org/node/272268 ). This module does that what I need: correct copy of sections/categories structure. Is it possible to make some changes to your module also to do so instead of creating single vocabulary "Topics"?

p.s.didn`t expect that migrating will be such problematic! I`m in Joomla jale :-)

bladiebla’s picture

I can't download the file.
Could someone upload it to a other server?

-edit- got it

kollo-dherbois’s picture

Hi. It is not broken - hope you can see link in comment #1 here => http://drupal.org/node/249643#comment-829971 And it works. or just click here :-) => http://svn.jcisio.net/d/joomla2drupal.tar.gz

Bilalx’s picture

Thank you for your module. I tried it with mambo 4.5 and drupal 6.3. It works as expected with my encoding latin1_swedish_ci.

Now i just have to go back to the admin area to learn how to use Drupal :)

jcisio’s picture

Hello,

I plan to add some more features, include SOBI2 -> CCK migration. I'll try it this weekend, but any ideas to export SOBI2 structure and import it into CCK are welcome, or just some place where there is explanation. Especially for CCK2 and Drupal 6, as tables structure has changed since then.

jcisio.

DocMartin’s picture

Hi jcisio:

Bit late for me, but a couple of things that may be worth a look as you aim to enhance the module:

I think better if create vocabularies for Joomla/Mambo sections, then have the category terms for categories.
Free tags from keywords in are good.

Maybe take article titles from mambo/joomla short page titles, or give option to do so. Were important for me, as I used in creating URLs w Joomla, and can use pathauto to create the same URLs in Drupal.
[Ideally, then, long titles to be used for the page title via page title module. Ideally! - I've no idea if this is real trouble to program]

Maybe can do something re links to images. Instead of to images/stories, maybe to /sites/files/www.example.com/files/images/ [no need for the stories folder] - this way, can browse images with IMCE, say.
Right now, I have images in both places; occasionally edit articles to amend links to images. Still haven't tried search n replace in mysql for these.

Hope plenty of people use the module, at least try Drupal for their sites; kudos for creating it! (and for revising, even tho seems you no longer need it)
____________________________
DocMartin and Hong Kong Outdoors CheungChauHK 長洲HK

____________________________
DocMartin and Hong Kong Outdoors

jcisio’s picture

DocMartin,

No, you was not late, I'm late ;)

For the vocab, I use only one, as an article can be placed in different sections (yes, possible with my Joomla! site).

For the images, it depends on site. For large sites, no one uses images/stories to bother with Joomla! stock images. The mosimage is different between 1.0 and 1.5 version of Joomla! (I don't use 1.5 so I'm not sure about other stuffs), so I leave it for user to customize. I remember that this converter takes care of mosimage ;-)

DocMartin’s picture

well, I'd used images/stories for storing images I added; didn't use mosimage, but added paths to images via Fckeditor. By leaving images/stories folder, these paths still work after change to Drupal - but images not in proper Drupal files folder.

Good that you're still answering qieries re the module - albeit after delay! - even though you have already done with using the module.

____________________________
DocMartin and Hong Kong Outdoors

glaster’s picture

Hi,
I receive the following error message:
Fatal error: Call to undefined function content_clear_type_cache() in /modules/joomla2drupal/joomla2drupal.module on line 887
I am running drupal 6.3
Any ideas?

jcisio’s picture

Please disable *gallery* module when you convert.

The converter requires CCK (and a few other modules) to convert content types other than Joomla!'s content items.

glaster’s picture

Hi,
I tested several alternatives, disabling all options I still receive the error
Cannot redeclare db_status_report() (previously declared in (...edited)/includes/database.mysql.inc:20) in (...edited)/includes/database.mysqli.inc on line 39

Is there a list of all possible modules needed for it to work? I would not mind adding extra modules if I can do the import outside of SQL.
THANKS

jcisio’s picture

I think your problem is that Drupal doesn't support 2 different db engines (even you can use more than 1 db at the same time). In the error message I see that mysqli is used first, then mysql.

You might switch your Drupal db connection from mysqli to mysql and let my know if it works.

Edit: or from mysql to mysqli. I'll fix this bug soon.

it_for_change’s picture

Hi there,

I have successfully used your module to import the content from a Joomla site into a Drupal site. My question: is there a way to keep the menu information generated in Joomla and bring this into menu_links in Drupal, or do we have to recreate the entire menu structure?

Thanks in advance for your help.

jcisio’s picture

Hi it_for_change,

No, it doesn't convert the menu structure. I'll hardly keep the Joomla! menu after the migration!

greta_drupal’s picture

Yikes! Why would you want to keep that awful Joomla menu system.

Shura80’s picture

The module works, but there's a problem with the password due to the differences in encrypting methods between Joomla (from 1.0.13) and Drupal.

In fact Drupal only uses MD5 while Joomla now uses a function that generate the md5 of the password, appends to this a string of 16 random charcaters, re-encode this 48 characters (32 for MD5 + 16 for random string) and print the new encrypted md5 string plus the random string in the users table of the database.

Something like xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:xxxxxxxxxxxxxxxx

So the first 32 charaters before ":" are not the simple md5 of the password given by the user.

The only thing to do is request a new password.

:)

trampgeek’s picture

Hi jcsio

Thanks for making this available -- it was very helpful in getting me going. However, in the current version of the code it only converts the first 100 users and first 100 content items. Fix is very easy -- in joomla2drupal.module lines 288 and 293, the divisors should be 100 not 1000, since you do 100 items at a time.

-- trampgeek

ac00perw’s picture

I hacked the module to accept community builder profile fields as such:

1. Add your custom fields to the profile fields section:


// Create profile fields
    $query = "INSERT INTO {profile_fields} (fid, title, name, explanation, category, page, type, weight, required, register, visibility, autocomplete, options) VALUES (%d, '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, %d, %d, '%s')";
    db_query($query, 1, 'Fullname', 'profile_fullname', 'Your fullname', 'Personal information', '', 'textfield', 0, 0, 0, 2, 0, '');
    db_query($query, 2, 'Address', 'profile_address', 'Your Address', 'Personal information', '', 'textfield', 1, 0, 0, 2, 0, '');
    db_query($query, 3, 'City', 'profile_city', 'Your City', 'Personal information', '', 'textfield', 2, 0, 0, 2, 0, '');
    db_query($query, 4, 'State', 'profile_state', 'Your State', 'Personal information', '', 'textfield', 3, 0, 0, 2, 0, '');
    db_query($query, 5, 'Postal Code', 'profile_postalcode', 'Your Postal Code', 'Personal information', '', 'textfield', 4, 0, 0, 2, 0, '');
    db_query($query, 6, 'Phone', 'profile_phone', 'Your Phone', 'Personal information', '', 'textfield', 5, 0, 0, 2, 0, '');

2. Change the query in the import_users function:

$result = db_query_range("SELECT u.*, c.cb_streetaddress as address, c.cb_state as state, c.cb_zip as zip, c.cb_phone as phone FROM %susers u, jos_comprofiler c where c.id=u.id ORDER BY u.id", $_joomla2drupal_vars['config']['Joomla']['db_prefix'], $start, 100);

3. Insert the Community Builder profile fields into profile_values:

db_query("INSERT INTO {profile_values} (fid, uid, value) VALUES (%d, %d, '%s')", 1, $created_user->uid, $user['name']);
db_query("INSERT INTO {profile_values} (fid, uid, value) VALUES (%d, %d, '%s')", 2, $created_user->uid, $user['address']);
db_query("INSERT INTO {profile_values} (fid, uid, value) VALUES (%d, %d, '%s')", 3, $created_user->uid, $user['city']);
db_query("INSERT INTO {profile_values} (fid, uid, value) VALUES (%d, %d, '%s')", 4, $created_user->uid, $user['state']);
db_query("INSERT INTO {profile_values} (fid, uid, value) VALUES (%d, %d, '%s')", 5, $created_user->uid, $user['zip']);
 db_query("INSERT INTO {profile_values} (fid, uid, value) VALUES (%d, %d, '%s')", 6, $created_user->uid, $user['phone']);

4. Yeah, it's a little ugly, but you'll only be using this module once, eh? Sweep the dirt under the rug.

enjoy777’s picture

hello

I tried to use this module to convert my joomla articles to drupal, but I have problem.
This module only migrates 100 first records from joomla content table and in drupal node table I can see only 100 migrated articles.
So how can I change it? I do it on my local server so maybe it is a problem with a local server. But I don't know how and what to change in the code or config files

Any idea?

jcisio’s picture

I was testing the migration so I limited this. However it's easy to fix, cf. previous comments. Or download the latest version (hope it works, I didn't test!)

Now I'm into the customisation part and I try not to touch this module, so that it works for you. Use this for a base only.

Regards,

t3ns41’s picture

hi jisio, thanks for this module i already import from joomla with content over 20.000 article and it work great. i change the code so i can import all article. i successfully import all the article but i got problem when import comment, it doesnt insert in table comment. in my joomla database the comment is over 90000 rows. when import article to my drupal it's take 8 hours to complete the import.

i think it would be better for someone that under development sites using drupal like me, if the module that can import data or without truncate the table and rewrite existing data, i think it will reduce time if i want to import newest article in my joomla database. because when under migration to drupal, user from my joomla insert article over 50 article a day. if user can only import the newest article i think it will help someone and it will less consumtion time.

thanx... for this module...:D

jcisio’s picture

Hi t3ns41,

That's one of ideas when I developed this module. However, it needs more time to implement (you must however get all the user info, sync their ID... then check when to start). An easy fix is that you remove the truncation code, when importing content, check if that ID exists.

About the migration, I'd make my Joomla! in "archive mode" for one day, do the conversion, then close Joomla! site, open Drupal's one!

greta_drupal’s picture

Is there anyway to use a SQL dump file for the conversion rather than having to put in Joomla site db access info?

I got the clear cache function error (noted by someone else) when I did try with db connection. But, I would prefer to run a conversion without involving the live Joomla site.

I can build the theme, menus, and users (there are only 6) from scratch in Drupal, but there is a lot of content in Joomla.

jcisio’s picture

You can import your dump file into the same Drupal db (with different prefix), then run the conversion.

ddwornik’s picture

This worked so well i can't believe it.

A very sincere thank you.

aac’s picture

Subscribing!!

---~~~***~~~---
aac

onion’s picture

You just saved me a few weeks and several millimeters off my teeth!!

malclocke’s picture

Hi jcisio,

First of all I'd like to thank you for all your work on this module. It will save myself and many others a huge headache.

Are you still actively developing this module? If so, would you consider setting up the module as an official drupal.org contrib module? I plan on adding some features to this module and this would make it easy to share this work with others. If you do not have time or interest in doing this, would you mind if I did? I would of course give you full credit as the module creator.

Thanks,

Malc

Keiichi’s picture

I have successfully migrated from Joomla 1.5.7 to Drupal 6.12! I did have to extend my PHP memory limit due to an error that occured during the process, but this was a minor php.ini/.htaccess fix.

Thanks a ton! This really cured my headache.

jcisio’s picture

Hi malclocke,

This module is now in the freeze period and I don't think I will add any features in it. So if you want to develope, you are welcome to create a contrib module on it. Let me know if you (or drupal.org) need the SVN repository, too.

Best regards,
jcisio

bradweikel’s picture

Malc,

Since you seem to have your hands in both, could you comment on the status of this module as well the "Joomla to Drupal" module at
http://drupal.org/project/joomla ? Are you still planning to add this module to Contrib and add features to it, or are you integrating the two modules?

I'm sure I'm not the only one who isn't sure which option to go with, but my preference is certainly to work inside of Contrib so I can share any bugs or improvements.

Once you've clarified, maybe we should ask the OP to update the original post, too, so it doesn't get lost in the comments.

Thx,
Brad

malclocke’s picture

First up, thanks jcisio but I have already started working on the joomla project in contrib as I had fairly urgent time pressure to start working for my client and the fact that the other module was a contrib project swayed it. I will probably integrate the best parts of joomla2drupal into this module (with full credit given to jcisio of course) as I don't think it will benefit anyone to have two different modules in contrib doing this.

Brad,

Yes I am very actively working on this module. I will update the project page with planned features in the next few days, but briefly I am planning the following:

  • Port to D6 - Done
  • Allow users to log in with Joomla passwords - Done
  • Support connection to remote database - Done, code based on that from joomla2drupal
  • Allow mapping of Joomla sections / categories to content types
  • Allow rolling imports via cron, e.g. keep Drupal site synchronised with Joomla.
  • Redirect old Joomla URLs to Drupal ones
  • Some other bits'n'bobs ...

So if you are planning on a Joomla 1.0.x migration to Drupal 6 I would recommend you keep an eye on http://drupal.org/project/joomla for an alpha release over the next couple of weeks.

Haemathemesis’s picture

edited.

kollo-dherbois’s picture

This module doesn`t work in this current version (which you can download from TS post) unfortunately. I tried it with current Drupal 6.19, also downgraded to Drupal 6.2 to try again...
Then I decided to try previous version of module (I remember it worked fine then) and yes, it works!
I can`t see any improvments in current version of module... except it just not working :-)

So my advises:

1. If you want just to import your Joomla site content to Drupal, try this module http://drupal.org/project/joomla
It works fine! It`s quick...

2. Only if you want to import your comments as well then you`ll have to try this module. It works (in previous version as I stated above). I tried it yesterday - it took about 10 hours to import about 6 000 articles + comments.

p.s. If somebody need to download previous version of jcisio`s module make request here...

jcisio’s picture

I have the repository of this module. I wrote it more than two years ago, it has some custom settings only for my site. I don't know why the current version does not work. The last time I used this module, it converted 12,000 nodes, 15,000 comments and 20,000+ users in less than 10 minutes.

I'm willing to upload this module to drupal.org as a project and fix bug. However, as I no longer need this module, I can't put so much effort. If there is someone who want to become co-maintainer, I'm setting up a project.

kollo-dherbois’s picture

Seems I wasn`t correct saying "module doesn`t work", so I add "for me". I`m actually interested why.
It starts importing and stucks on halfway (about 3000 of 6000 imported) showing batch error (I don`t remember exact text of error message). Anyway, previous version of your module did the job. It took long though...

"I have the repository of this module..."

I picked up the one I downloaded two years before. Is this repository available for public access?

jcisio’s picture

The repository is not available for public access because I develop some other private modules. That's why I closed the public SVN and put an daily snapshot of the joomla2drupal module (well, which does not change frequently).

I've set up a project at http://drupal.org/project/joomla2drupal. This one should work.

kollo-dherbois’s picture

I've set up a project at http://drupal.org/project/joomla2drupal. This one should work.

good news:-)

corbin’s picture

problem : after a migration, visitor cannot access to node though having permission on "content access".

explanation : nothing's done in table node_access

general solution :
in phpMyAdmin / SQL :
INSERT INTO node_access VALUES (0, 0, 'all', 1, 0, 0) ;
don't forget the prefix ;-)

original french post : http://drupalfr.org/forum/support/support-general/1779-acces-refuse-mess...

CC

jcisio’s picture

Then I'm quite sure you had problem with your Drupal install before (or after backup/restore). That row should have been there after the Drupal installation.