News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

[SMF Converter] Drupal 5.7

Started by SleePy, May 27, 2008, 05:03:27 PM

Previous topic - Next topic

SleePy

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.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Wolvix

#1
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)

SleePy

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 ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Wolvix

Quote from: SleePy 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.
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

Quote from: Wolvix on July 09, 2008, 12:22:27 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?

Wolvix

#5
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.

SleePy

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:
---* {$to_prefix}members

Replace:
---* {$to_prefix}members
---{
$ignore = true;
---}
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Wolvix

#7
OK, that helped a bit. I'm getting a few steps further. Now the conversion stops with this error:
QuoteConverting 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

ThorstenE

open the .sql file

remove:
---{
$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..

Wolvix

Yes!! That did the trick.
QuoteConverting 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

Trulyana

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?

SleePy

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 ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Trulyana

Quote from: SleePy 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.

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.

SleePy

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 ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Trulyana

Quote from: SleePy 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.

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?

SleePy

Our converters are only made for converting to SMF. We don't provide converters for converting away.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Trulyana

Quote from: SleePy 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.


Cheers! :)

marlz827

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

The files above are needed when converting your drupal (forum) to SMF..
Helpful information: Converting to SMF

BigMike

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

Advertisement: