Advertisement:

Author Topic: [SMF Converter] Drupal 5.7  (Read 29310 times)

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 29,933
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
[SMF Converter] Drupal 5.7
« on: May 27, 2008, 05:03:27 PM »
Software: Drupal
Version: 5.7

This is the official support topic for Drupal 5.7 converter.  Use this topic to ask for support for this converter.

Changelog
!Fixed a bug in topics / messages conversion.

drupal_migration.php
For the conversion to be able to complete, the drupal_migration.php file is required. You will need to modify this file to reflect your Database name and Database prefix (if specified). You can find this information in /sites/<site name>/settings.php in the variable "$db_url" and "$db_prefix"

convert.php
Use this convert.php with the .sql file attached in this topic.
« Last Edit: July 18, 2009, 02:42:45 PM by TE »
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline Wolvix

  • Newbie
  • *
  • Posts: 8
Re: [SMF Converter] Drupal 5.7
« Reply #1 on: July 08, 2008, 11:48:12 PM »
I'm having problems getting this to work. I've uploaded convert.php,  drupal_migration.php and drupal57_to_smf.sql to the root of my SMF install. Changed the information in drupal_migration.php. I then point my browser to the convert.php, change the information for  path to Drupal install and SMF database password. But I get the message "Unable to find the settings for Drupal 5.7 . Please double check the path and try again." no matter what I do.

Is there something I've missed? (And yes, the path to the Drupal install is correct)
« Last Edit: July 08, 2008, 11:59:20 PM by Wolvix »

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 29,933
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: [SMF Converter] Drupal 5.7
« Reply #2 on: July 09, 2008, 12:08:49 AM »
For best results the "drupal_migration.php" file should be in your drupal root folder..

Make sure you specified the correct database name and prefix As well that the mysql user has access to both the smf and drupal database.
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline Wolvix

  • Newbie
  • *
  • Posts: 8
Re: [SMF Converter] Drupal 5.7
« Reply #3 on: July 09, 2008, 12:22:27 AM »
For best results the "drupal_migration.php" file should be in your drupal root folder..

Make sure you specified the correct database name and prefix As well that the mysql user has access to both the smf and drupal database.
Thank you for your reply.

Placing the drupal_migration.php file in the root of the Drupal install did the trick, but now I've having some problems converting the users. I'm getting the message "Duplicate entry '572' for key 1" So I'm guessing there's a problem with my database somewhere. I'll try to sort this out and report back.

ThorstenE

  • Guest
Re: [SMF Converter] Drupal 5.7
« Reply #4 on: July 09, 2008, 01:23:16 AM »
I'm getting the message "Duplicate entry '572' for key 1" So I'm guessing there's a problem with my database somewhere. I'll try to sort this out and report back.
Duplicate Entry is sometimes a reason for slow server-performance.. retry the conversion from the beginning.. is the error the same?

Offline Wolvix

  • Newbie
  • *
  • Posts: 8
Re: [SMF Converter] Drupal 5.7
« Reply #5 on: July 09, 2008, 01:43:50 AM »
Yes the error is the same. I also tried dropping the SMF database and did a fresh install and a fresh conversion, but the conversion problem persists. I also tried to delete the user #572 but then the duplicate key just jumped to #574.

It would not surprise me if there are problems with my Drupal database, it's an old install which have been running for a long time and has had several Drupal upgrades plus a bunch of 3rd-party modules. I've  tried to repair and optimize the database through phpmyadmin, but it's not helping.
« Last Edit: July 09, 2008, 01:49:04 AM by Wolvix »

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 29,933
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: [SMF Converter] Drupal 5.7
« Reply #6 on: July 09, 2008, 02:11:23 AM »
Well, we could tell it to ignore the errors, the only possibility is that you might have some users with incomplete data.

To do this open the .sql file

Find:
Code: [Select]
---* {$to_prefix}members
Replace:
Code: [Select]
---* {$to_prefix}members
---{
$ignore = true;
---}
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline Wolvix

  • Newbie
  • *
  • Posts: 8
Re: [SMF Converter] Drupal 5.7
« Reply #7 on: July 09, 2008, 02:20:27 AM »
OK, that helped a bit. I'm getting a few steps further. Now the conversion stops with this error:
Quote
Converting members... Successful.
Converting categories... Successful.
Converting boards... Unsuccessful!
This query:

    DELETE FROM `wolvix_smf`.smf_boards
    WHERE ID_BOARD =;

Caused the error:

    You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2

EDIT:  BTW. I really appreciate you guys helping me out. Thanks a lot.

EDIT2: I've tried to uncheck the [ ]Boards... box, but the error persists. I also tried unchecking all the boxes, just for fun, but it seems the script insist on doing all the steps whether they're selected or not.

I've tried to search for the error, but most of the results just gives me websites with a broken MySQL installs displaying the error "You have an error in your SQL syntax.  [...]"

I've also been looking at the 'Converting boards' section in the drupal57_to_smf.sql file, but my knowledge about MySQL is rather slim, so I can't tell if there's a problem in the code or not.

EDIT3: I'm using MySQL 4.0.24 if that's any help
« Last Edit: July 09, 2008, 03:23:12 AM by Wolvix »

ThorstenE

  • Guest
Re: [SMF Converter] Drupal 5.7
« Reply #8 on: July 09, 2008, 03:26:54 AM »
open the .sql file

remove:
Code: [Select]
---{
$no_add = true;
$keys = array('ID_CAT', 'name', 'catOrder');

$request = mysql_query("
SELECT value
FROM {$from_prefix}variable
WHERE name ='forum_containers'
LIMIT 1");
list($containers) = mysql_fetch_row($request);
mysql_free_result($request);
$cont = unserialize($containers);

foreach ($cont as $categories)
{
$request = mysql_query("
SELECT name
FROM {$from_prefix}term_data
WHERE tid = $categories
LIMIT 1");
list($name) = mysql_fetch_row($request);
mysql_free_result($request);

convert_query("
DELETE FROM {$to_prefix}boards
WHERE ID_BOARD = $categories ");
}
---}
this may result in converting the drupal categories to SMF Boards.. after successful conversion you can remove these by hand..

Offline Wolvix

  • Newbie
  • *
  • Posts: 8
Re: [SMF Converter] Drupal 5.7
« Reply #9 on: July 09, 2008, 03:36:04 AM »
Yes!! That did the trick.
Quote
Converting boards... Successful.
Converting topics... Successful.
Converting posts (this may take some time)... Successful.
Converting posts - Part 2(this may take some time)... Successful.
Converting attachments... Successful.
Converting avatars... Successful.
Recalculating forum statistics... Successful.
Conversion Complete

Thanks a bunch! I've been wanting to move my community over from Drupal to SMF for quite some time now.

I really appreciate the help I've gotten here and the fact that you two guys have been making this converter. Now all I need to do is some forum house keeping and I'm set.

Cheers!

Wolven

Offline Trulyana

  • Semi-Newbie
  • *
  • Posts: 28
Re: [SMF Converter] Drupal 5.7
« Reply #10 on: July 13, 2008, 07:47:38 PM »
Do you need to have a clean workable database for the conversion to work? As my database has an error in the settings file, and won't read off in smf. Will it work in conversion when transferred over into drupal? Or not work at all, as the error will still be visible?

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 29,933
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: [SMF Converter] Drupal 5.7
« Reply #11 on: July 13, 2008, 10:27:11 PM »
The converter assumes you have SMF installed and that it is working properly. You can try it, I don't know if it will still convert correctly to SMF.
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline Trulyana

  • Semi-Newbie
  • *
  • Posts: 28
Re: [SMF Converter] Drupal 5.7
« Reply #12 on: July 14, 2008, 02:05:48 PM »
The converter assumes you have SMF installed and that it is working properly. You can try it, I don't know if it will still convert correctly to SMF.

So, it assumes the SMF software is there, before converting to drupal? Will a corrupted database affect it? I just want to move the database into drupal. The database from SMF, not the actual software.

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 29,933
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: [SMF Converter] Drupal 5.7
« Reply #13 on: July 14, 2008, 02:07:09 PM »
Are you wanting to convert away from SMF? This converter is to SMF. It won't convert you to Drupal..
It takes data from a Drupal database and rereads it and puts it into the SMF database.
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline Trulyana

  • Semi-Newbie
  • *
  • Posts: 28
Re: [SMF Converter] Drupal 5.7
« Reply #14 on: July 14, 2008, 02:27:01 PM »
Are you wanting to convert away from SMF? This converter is to SMF. It won't convert you to Drupal..
It takes data from a Drupal database and rereads it and puts it into the SMF database.

Yup, that's the idea. Convert from SMF to drupal. I gather I'll need to have a look at the website for that. Unless there is a converter here for that too?

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 29,933
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: [SMF Converter] Drupal 5.7
« Reply #15 on: July 14, 2008, 02:28:09 PM »
Our converters are only made for converting to SMF. We don't provide converters for converting away.
 
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline Trulyana

  • Semi-Newbie
  • *
  • Posts: 28
Re: [SMF Converter] Drupal 5.7
« Reply #16 on: July 17, 2008, 01:45:43 PM »
Our converters are only made for converting to SMF. We don't provide converters for converting away.
 

Cheers! :)

Offline marlz827

  • Newbie
  • *
  • Posts: 3
Re: [SMF Converter] Drupal 5.7
« Reply #17 on: August 02, 2008, 01:53:47 PM »
Hello guys i have drupal 5.7 installed and was wondering about this smf conversion is there a mod i need to install on smf for this to work?

ThorstenE

  • Guest
Re: [SMF Converter] Drupal 5.7
« Reply #18 on: August 02, 2008, 03:19:04 PM »
The files above are needed when converting your drupal (forum) to SMF..
Helpful information: Converting to SMF

Offline BigMike

  • Full Member
  • ***
  • Posts: 635
  • Gender: Male
    • http://facebook.com/huusoku on Facebook
    • Marlin Crawler, Inc.
Re: [SMF Converter] Drupal 5.7
« Reply #19 on: October 01, 2008, 11:37:20 AM »
Hey guys,

I posted in Drupal + SMF bridge Question... last week and never got a response, so I used different search terms and finally found this thread.

I am running Drupal 5.10. I am entirely new to Drupal.

I am not quite sure what this Converter is all about. So.................... this is to convert the default forum software embedded with Drupal to SMF, right?

Ok, if this is true, then my question is which SMF?

What if I already have a huge SMF forum that I've been using for many, many years, is there a merge or bridge software?

I understand what convert to means, but how about connect to ? Is this a two step process?

Thanks for the clarification
BigMike