• Welcome to Simple Machines Community Forum. Please login or sign up.
October 21, 2021, 01:25:13 PM

News:

Follow SMF on Twitter.


[SMF Converter] IPB 3.0

Started by Nibogo, October 13, 2010, 07:32:18 PM

Previous topic - Next topic

Norv

Please make a little more modification, to convert.php:
Code (find) Select

require($sourcedir . '/Security.php');

Code (add after) Select

require($sourcedir . '/Subs-Admin.php');
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

cashwed

i have a problem and i don't know what to do :(

Converting members... Unsuccessful!
This query:

    SELECT
    m.member_id AS id_member, SUBSTRING(m.name, 1, 80) AS member_name,
    SUBSTRING(m.members_display_name, 1, 255) AS real_name, m.email AS email_address,
    SUBSTRING(m.members_pass_hash, 1, 64) AS passwd, SUBSTRING(m.members_pass_salt, 1, 8) AS password_salt,
    SUBSTRING(pp.pp_bio_content, 1, 255) AS usertitle, m.last_visit AS last_login,
    m.joined AS date_registered, SUBSTRING(pc.field_3, 1, 255) AS website_url,
    SUBSTRING(pc.field_3, 1, 255) AS website_title,
    SUBSTRING(pc.field_4, 1, 255) AS icq, SUBSTRING(pc.field_1, 1, 16) AS aim,
    SUBSTRING(pc.field_8, 1, 32) AS yim, SUBSTRING(pc.field_2, 1, 255) AS msn,
    SUBSTRING(pp.signature, 1, 65534) AS signature, m.ip_address AS member_ip, m.ip_address AS member_ip2, '0' AS total_time_logged_in,
    IF (m.bday_year IS NULL, '0001-01-01', IF (m.bday_year = 0 AND m.bday_month != 0 AND m.bday_day != 0, CONCAT('0004-', m.bday_month, '-', m.bday_day), CONCAT_WS('-', IF(m.bday_year <= 4, 0001, m.bday_year), IF(m.bday_month = 0, 01, IF(m.bday_month < 10, CONCAT('0', m.bday_month), m.bday_month)), IF(m.bday_day = 0, 01, IF(m.bday_day < 10, CONCAT('0', m.bday_day), m.bday_day))))) AS birthdate, m.email_pm AS pm_email_notify,
    CASE
    WHEN (m.member_group_id = '4') THEN 1
    WHEN (m.member_group_id = '2') THEN -1
    WHEN (m.member_group_id = '6') THEN 2
    ELSE 0
    END AS id_group,
    CASE
    WHEN (pc.field_5 = 'm') THEN 1
    WHEN (pc.field_5 = 'f') THEN 2
    ELSE 0
    END AS gender
    FROM `fanart_azpire`.members AS m
    LEFT JOIN `fanart_azpire`.pfields_content AS pc ON (pc.member_id = m.member_id)
    LEFT JOIN `fanart_azpire`.profile_portal AS pp ON (pp.pp_member_id = m.member_id)
    LIMIT 0, 500;

Caused the error:

    Unknown column 'pc.field_1' in 'field list'

hiredgunz

I made your suggested change Norv and got:

Converting...
Converting posts (this may take some time)...
Successful.
Converting polls... Successful.
Converting poll options... Successful.
Converting poll votes... Successful.
Converting personal messages (step 1)... Successful.
Converting personal messages (step 2)... Successful.
Converting topic notifications... Successful.
Converting board notifications... Successful.
Converting censored words... Successful.
Converting moderators... Successful.
Converting calendar events... Successful.
Converting smileys... Successful.
Converting attachments... Successful.
Converting user avatars... Successful.
Converting settings...
Warning: filemtime() [function.filemtime]: stat failed for /Settings.php in /****/****/****/forums/Sources/Subs-Admin.php on line 260

Warning: file_get_contents(/Settings.php) [function.file-get-contents]: failed to open stream: No such file or directory in /***/***/***/forums/Sources/Subs-Admin.php on line 263
Successful.
Recalculating forum statistics... Duplicate key name 'ip_index'

Still, the conversion got even closer to the end!

ThorstenE


Insane33

Converting moderators...Wrong value type sent to the database. Integer expected. (id_board)

How can this be solved?

ThorstenE

in invision30_to_smf.sql find:
if (empty($row['id_member']))
replace with:
if (empty($row['id_member']) || empty($row['id_board']))
then restart the converter.

Insane33

Actually I have ipb3_to_smf.sql ..did what you said and it's the same error...

Other solutions?

ThorstenE

ok, let's try this instead..
if (empty($row['id_member']) || !is_int($row['id_board']))

Insane33

Now I get this:
Notice: Undefined variable: row in /***/****/*****/smf/convert.php on line 1284

Warning: Invalid argument supplied for foreach() in /***/****/*****/smf/convert.php on line 1284

Warning: array_combine() [function.array-combine]: Both parameters should have at least 1 element in /*****/****/******/smf/Sources/Subs-Db-mysql.php on line 635
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 3

ThorstenE

ok, I believe it might be better to completely remove the moderators block..

/******************************************************************************/
--- Converting moderators...
/******************************************************************************/

TRUNCATE {$to_prefix}moderators;

---* {$to_prefix}moderators
---{
$ignore = true;

if (empty($row['id_member']))
unset($row);
---}
SELECT member_id AS id_member, forum_id AS id_board
FROM {$from_prefix}moderators
WHERE member_id != -1;
---*

After removing this code the converter should finish without errors.

I'd be interested in the result of this query:
SELECT member_id AS id_member, forum_id AS id_board
FROM ipb_moderators
WHERE member_id != -1;

maybe you can execute it via phpMyAdmin and post the result.

Insane33

I managed to convert something,but all users have 0 posts altough the posts appear on the forums.

I also got an error while converting
Converting settings...
Warning: filemtime() [function.filemtime]: stat failed for /Settings.php in /****/****/****/smf/Sources/Subs-Admin.php on line 260

Warning: file_get_contents(/Settings.php) [function.file-get-contents]: failed to open stream: No such file or directory in /****/*****/*****/smf/Sources/Subs-Admin.php on line 263
Successful.


kR105!

January 14, 2011, 05:54:27 PM #32 Last Edit: January 14, 2011, 05:58:45 PM by kR105!
Quote from: silabsoft on November 05, 2010, 01:40:32 PM
I had this problem too change the date structure in the SQL file provided.

mine hangs on coverting topics when it gets to topic 26546 it hangs talking about a duplicate key.
same error here: "Duplicate entry '1454' for key 1", I tried deleting the topic with that ID and re-run the converter, but the same error appeared but with different number.

Edit: Full log from the converter:
Quote
Converting members... Successful.
Converting categories... Successful.
Converting boards... Successful.
Converting topics...Duplicate entry '1454' for key 1

ThorstenE

kR105!,
in ipb3_to_smf.sql find:
---* {$to_prefix}topics 250
add after
---{
$ignore = true;
---}

kR105!

Worked! Thank you!

The convertion ended with some warnings, but the topics and users was converted sucessfully. The problem now is that my board is mostly spanish text and in the convertion process some characters now appear weird, for example:

IPB: Preséntate
Converted SMF: Preséntate

I tried changing the charset of my new board to ISO-8859-1 but more weird characters appeared so I reverted it to UTF-8.

Can you please help me? Maybe I'm missing something..




Convertion log:
Quote
Converting posts (this may take some time)...
Successful.
Converting polls... Successful.
Converting poll options... Successful.
Converting poll votes... Successful.
Converting personal messages (step 1)... Successful.
Converting personal messages (step 2)... Successful.
Converting topic notifications... Successful.
Converting board notifications... Successful.
Converting censored words... Successful.
Converting moderators... Successful.
Converting calendar events... Successful.
Converting smileys... Successful.
Converting attachments... Successful.
Converting user avatars...
Warning: copy(/home/kr105/public_html/foro/uploads/av-1247.txt) [function.copy]: failed to open stream: No such file or directory in /home/kr105/public_html/foro2/convert.php(1263) : eval()'d code on line 59
Successful.
Converting settings...
Warning: filemtime() [function.filemtime]: stat failed for /Settings.php in /home/kr105/public_html/foro2/Sources/Subs-Admin.php on line 260

Warning: file_get_contents(/Settings.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/kr105/public_html/foro2/Sources/Subs-Admin.php on line 263
Successful.
Recalculating forum statistics... Successful.

ThorstenE

the warning is a missing avatar file, nothing to worry about.

the charset issue: 
I believe your IPB is UTF-8? you should install SMF with UTF-8 as character set (there should be an option list in install.php) and re-convert the forum.

imno007

January 28, 2011, 12:25:10 PM #36 Last Edit: January 28, 2011, 12:38:21 PM by imno007
Has anyone tried this with IPB 3.1? I need to do a 3.1 conversion to SMF 2.0 RC4, but I'm hesitant to get into it if it's gonna turn into a major pain in the arse.

EDIT: Okay, I see that it has been attempted, though it does look like it will be a pain. ;)

Arrnea

Can this be used to convert from IPB 3.0.x to SMF 1.1.12, or only to SMF 2.0 RC?


Banksy

I get this error. :(
Converting members...
Unsuccessful!
This query:
SELECT
m.member_id AS id_member, SUBSTRING(m.name, 1, 80) AS member_name,
SUBSTRING(m.members_display_name, 1, 255) AS real_name, m.email AS email_address,
SUBSTRING(m.members_pass_hash, 1, 64) AS passwd, SUBSTRING(m.members_pass_salt, 1, 8) AS password_salt,
SUBSTRING(pp.pp_bio_content, 1, 255) AS usertitle, m.last_visit AS last_login,
m.joined AS date_registered, SUBSTRING(pc.field_3, 1, 255) AS website_url,
SUBSTRING(pc.field_3, 1, 255) AS website_title,
SUBSTRING(pc.field_4, 1, 255) AS icq, SUBSTRING(pc.field_1, 1, 16) AS aim,
SUBSTRING(pc.field_8, 1, 32) AS yim, SUBSTRING(pc.field_2, 1, 255) AS msn,
SUBSTRING(pp.signature, 1, 65534) AS signature, m.ip_address AS member_ip, m.ip_address AS member_ip2, '0' AS total_time_logged_in,
IF (m.bday_year IS NULL, '0001-01-01', IF (m.bday_year = 0 AND m.bday_month != 0 AND m.bday_day != 0, CONCAT('0004-', m.bday_month, '-', m.bday_day), CONCAT_WS('-', IF(m.bday_year <= 4, 0001, m.bday_year), IF(m.bday_month = 0, 01, IF(m.bday_month < 10, CONCAT('0', m.bday_month), m.bday_month)), IF(m.bday_day = 0, 01, IF(m.bday_day < 10, CONCAT('0', m.bday_day), m.bday_day))))) AS birthdate, m.email_pm AS pm_email_notify,
CASE
WHEN (m.member_group_id = '4') THEN 1
WHEN (m.member_group_id = '2') THEN -1
WHEN (m.member_group_id = '6') THEN 2
ELSE 0
END AS id_group,
CASE
WHEN (pc.field_5 = 'm') THEN 1
WHEN (pc.field_5 = 'f') THEN 2
ELSE 0
END AS gender
FROM `banksy_ipb`.members AS m
LEFT JOIN `banksy_ipb`.pfields_content AS pc ON (pc.member_id = m.member_id)
LEFT JOIN `banksy_ipb`.profile_portal AS pp ON (pp.pp_member_id = m.member_id)
LIMIT 0, 500;
Caused the error:
Unknown column 'pp.pp_bio_content' in 'field list'


Advertisement: