Simple Machines Community Forum

SMF Support => Converting to SMF => IPB => Topic started by: vbgamer45 on August 31, 2019, 11:09:23 AM

Title: [SMF Converter] IPB 4.4
Post by: vbgamer45 on August 31, 2019, 11:09:23 AM
IPB 4.4 Beta Convertor to SMF 2.0.x

Notes: Tested on cloud database backup from IPB Cloud.
Did not have files to access you may have adjust the .sql configuration lines


---~ settings: "/conf_global.php"
---~ from_prefix: "`$INFO[sql_database]`.$INFO[sql_tbl_prefix]"
Title: Re: [SMF Converter] IPB 4.4
Post by: Loshmi on September 23, 2019, 11:09:39 AM
I'm getting this error at the 1st stage of converting (members):
    SELECT
    m.member_id AS id_member, SUBSTRING(m.name, 1, 80) AS member_name,
    SUBSTRING(m.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,
    m.member_title 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(m.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,
    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 `milosbts_novatest2`.core_members AS m
    LEFT JOIN `milosbts_novatest2`.core_pfields_content AS pc ON (pc.member_id = m.member_id)

    LIMIT 0, 500;

Caused the error:

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


Can you please help me with this one?
PS: I am converting IPB 4.4.6 to SMF 2.0.15.
Title: Re: [SMF Converter] IPB 4.4
Post by: vbgamer45 on September 23, 2019, 11:11:21 AM
Can you run this msyql statemetn
show create table `milosbts_novatest2`.core_pfields_content;
Title: Re: [SMF Converter] IPB 4.4
Post by: Loshmi on September 23, 2019, 11:20:30 AM
Like this?
Title: Re: [SMF Converter] IPB 4.4
Post by: vbgamer45 on September 23, 2019, 11:21:19 AM
Almost. There should be an option to view the result of the whole query.
Title: Re: [SMF Converter] IPB 4.4
Post by: Loshmi on September 23, 2019, 11:35:12 AM
Ok, let's try again...
Title: Re: [SMF Converter] IPB 4.4
Post by: vbgamer45 on September 23, 2019, 11:38:31 AM
Ok that's a new one. that table doesn't seem to have a lot of custom profile fields.... So not much to convert. I would need your .sql file to modify... from the convertor basiclly have to remove things that is trys to convert like gender, website url won't be carried over.
Title: Re: [SMF Converter] IPB 4.4
Post by: Loshmi on September 23, 2019, 11:50:04 AM
I don't mind losing gender, websites and about me section. Just want to keep members, their posts and maybe their birthday and registration date. Should I send you core_members.sql? May I send you somehow through private message cause I don't want to get public with all those emails inside that sql?
Title: Re: [SMF Converter] IPB 4.4
Post by: vbgamer45 on September 23, 2019, 11:57:01 AM
I mean just send the SMF ipb4.sql convert file in the root of your SMF file and that should work.
Title: Re: [SMF Converter] IPB 4.4
Post by: Loshmi on September 23, 2019, 12:05:39 PM
Sorry about the confusion, this is the 1st time I'm doing this. If I understood correctly this is the file that you have asked for...
Title: Re: [SMF Converter] IPB 4.4
Post by: Loshmi on September 23, 2019, 01:09:21 PM
So I have removed few lines in ipb44_to_smf.sql and now I got this:
    SELECT
    m.member_id AS id_member, SUBSTRING(m.name, 1, 80) AS member_name,
    SUBSTRING(m.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,
    m.member_title AS usertitle, m.last_visit AS last_login,
    m.joined AS date_registered,
    SUBSTRING(m.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,
    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,

    LIMIT 0, 500;

Caused the error:

    You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LIMIT 0, 500' at line 16

Thank you for helping me!
Title: Re: [SMF Converter] IPB 4.4
Post by: vbgamer45 on September 23, 2019, 01:15:49 PM
Remove comma after  END AS id_group,
Title: Re: [SMF Converter] IPB 4.4
Post by: Loshmi on September 23, 2019, 01:18:19 PM
Here's next stop:
    SELECT
    m.member_id AS id_member, SUBSTRING(m.name, 1, 80) AS member_name,
    SUBSTRING(m.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,
    m.member_title AS usertitle, m.last_visit AS last_login,
    m.joined AS date_registered,
    SUBSTRING(m.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,
    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

    LIMIT 0, 500;

Caused the error:

    Unknown table 'm' in field list
Title: Re: [SMF Converter] IPB 4.4
Post by: vbgamer45 on September 23, 2019, 01:23:34 PM
You cut off part of the query try this

SELECT
m.member_id AS id_member, SUBSTRING(m.name, 1, 80) AS member_name,
SUBSTRING(m.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,
        m.member_title AS usertitle, m.last_visit AS last_login,
        m.joined AS date_registered,]
SUBSTRING(m.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,
        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
FROM {$from_prefix}core_members AS m
     LEFT JOIN {$from_prefix}core_pfields_content AS pc ON (pc.member_id = m.member_id)
Title: Re: [SMF Converter] IPB 4.4
Post by: Loshmi on September 23, 2019, 01:37:35 PM
And another one:
    SELECT
    m.member_id AS id_member, SUBSTRING(m.name, 1, 80) AS member_name,
    SUBSTRING(m.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,
    m.member_title AS usertitle, m.last_visit AS last_login,
    m.joined AS date_registered,]
    SUBSTRING(m.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,
    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
    FROM `milosbts_novatest2`.core_members AS m
    LEFT JOIN `milosbts_novatest2`.core_pfields_content AS pc ON (pc.member_id = m.member_id)

    LIMIT 0, 500;

Caused the error:

    You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ']
    SUBSTRING(m.signature, 1, 65534) AS signature, m.ip_address AS member_ip, m.' at line 6
Title: Re: [SMF Converter] IPB 4.4
Post by: vbgamer45 on September 23, 2019, 01:38:52 PM
oops made a mistake

SELECT
m.member_id AS id_member, SUBSTRING(m.name, 1, 80) AS member_name,
SUBSTRING(m.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,
        m.member_title AS usertitle, m.last_visit AS last_login,
        m.joined AS date_registered,
SUBSTRING(m.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,
        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
FROM {$from_prefix}core_members AS m
     LEFT JOIN {$from_prefix}core_pfields_content AS pc ON (pc.member_id = m.member_id)
Title: Re: [SMF Converter] IPB 4.4
Post by: Loshmi on September 23, 2019, 01:47:44 PM
We are getting somewhere... :)
Converting members...Field 'buddy_list' doesn't have a default value
Title: Re: [SMF Converter] IPB 4.4
Post by: vbgamer45 on September 23, 2019, 02:14:56 PM

SELECT
m.member_id AS id_member, SUBSTRING(m.name, 1, 80) AS member_name,
SUBSTRING(m.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,
        m.member_title AS usertitle, m.last_visit AS last_login, "" as buddy_list,
        m.joined AS date_registered,
SUBSTRING(m.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,
        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
FROM {$from_prefix}core_members AS m
     LEFT JOIN {$from_prefix}core_pfields_content AS pc ON (pc.member_id = m.member_id)
Title: Re: [SMF Converter] IPB 4.4
Post by: Loshmi on September 23, 2019, 02:20:48 PM
Converting members...Field 'message_labels' doesn't have a default value
Thanks a million!
Title: Re: [SMF Converter] IPB 4.4
Post by: vbgamer45 on September 23, 2019, 02:44:46 PM

SELECT
m.member_id AS id_member, SUBSTRING(m.name, 1, 80) AS member_name,
SUBSTRING(m.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,
        m.member_title AS usertitle, m.last_visit AS last_login, "" as buddy_list, " " as message_labels,
        m.joined AS date_registered,
SUBSTRING(m.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,
        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
FROM {$from_prefix}core_members AS m
     LEFT JOIN {$from_prefix}core_pfields_content AS pc ON (pc.member_id = m.member_id)



If check above you can see what I am doing to fix this.
Title: Re: [SMF Converter] IPB 4.4
Post by: Loshmi on September 23, 2019, 02:52:07 PM
Ok, I saw what you did so I've made few changes after converter stopped. This is something else now:

Converting members... Successful.
Converting categories... Successful.
Converting boards... Successful.
Converting topics... Successful.
Converting posts (this may take some time)... Unsuccessful!
This query:

    SELECT
    p.pid AS id_msg, p.topic_id AS id_topic, p.post_date AS poster_time,
    CASE WHEN p.author_name = '' THEN 0 ELSE p.author_id END AS id_member, SUBSTRING(t.title, 1, 255) AS subject,
    SUBSTRING(p.author_name, 1, 255) AS poster_name,
    SUBSTRING(p.ip_address, 1, 255) AS poster_ip, p.use_emo AS smileys_enabled,
    IFNULL(p.edit_time, 0) AS modified_time, SUBSTRING(p.edit_name, 1, 255) AS modified_name,
    t.forum_id AS id_board, REPLACE(p.post, '<br />', '') AS body,
    SUBSTRING(IFNULL(m.email, '[email protected]'), 1, 255) AS poster_email, 'xx' AS icon
    FROM `milosbts_novatest2`.forums_posts AS p
    LEFT JOIN `milosbts_novatest2`.forums_topics AS t ON (t.tid = p.topic_id)
    LEFT JOIN `milosbts_novatest2`.core_members AS m ON (m.member_id = p.author_id)
    WHERE t.forum_id IS NOT NULL
    LIMIT 0, 500;

Caused the error:

    Unknown column 'p.use_emo' in 'field list'
Title: Re: [SMF Converter] IPB 4.4
Post by: vbgamer45 on September 23, 2019, 02:54:32 PM
Change p.use_emo AS smileys_enabled to
1  AS smileys_enabled
Title: Re: [SMF Converter] IPB 4.4
Post by: Loshmi on September 23, 2019, 03:11:13 PM
That did the trick - Conversion complete! I see all themes and posts but I can't log in  ???
QuotePassword security has recently been upgraded. Please enter your password again.
When I click on "Forgot your password?" I receive an email with my OpenID instead of password reset. And Invision community is signed bellow.
QuoteThis mail was sent because the 'forgot OpenID' function has been applied to your account. Below is the OpenID that your account is associated with:
*****
*****
Regards,
The Invision Community Team.
Do you have any suggestion?
Title: Re: [SMF Converter] IPB 4.4
Post by: Loshmi on September 23, 2019, 03:24:13 PM
Forgot to tell you that instead of user name and password I received on my email: IP address and Username.
Title: Re: [SMF Converter] IPB 4.4
Post by: vbgamer45 on September 23, 2019, 03:42:59 PM
Passwords might be an issue.You can try modifying
sources/LoginInOut.php
Find

// None of the below cases will be used most of the time (because the salt is normally set.)


Add before

$other_passwords[] = crypt($_POST['passwrd'], '$2a$13$' . $user_settings['password_salt']);
$other_passwords[] = password_verify($_POST['passwrd'],$user_settings['passwd']);



Also can you post your final .sql file you modified.


That might help but you still might need to reset all passwords.
Title: Re: [SMF Converter] IPB 4.4
Post by: Loshmi on September 23, 2019, 03:59:42 PM
Ok, I'm in! But there is a problem because I can't get into admin control panel. When I click on "Admin" or on any other option bellow, I just receive a blank page.
Title: Re: [SMF Converter] IPB 4.4
Post by: vbgamer45 on September 23, 2019, 04:03:28 PM
That's odd. Check your apache error log? Something seems broke. Make sure you are on PHP 7.1 or less.
Title: Re: [SMF Converter] IPB 4.4
Post by: Loshmi on September 23, 2019, 04:18:54 PM
So it's written that Web server is on PHP version: 7.2.7. I don't know how and where to check that Apache error logs.
Title: Re: [SMF Converter] IPB 4.4
Post by: vbgamer45 on September 23, 2019, 04:20:13 PM
Cpanel might have an area.
Otherwise webserver logs are in /var/log/httpd on linux   you can also enable php error logging to a file


can you also send me your final.sql file for this converter when you have a chance
Title: Re: [SMF Converter] IPB 4.4
Post by: Loshmi on September 23, 2019, 04:34:45 PM
This was our final version of the file that made it all the way to the end.
Title: Re: [SMF Converter] IPB 4.4
Post by: Loshmi on September 25, 2019, 11:50:04 AM
Hello again vbgamer45, do you have any other trick for my problem? Stil the same thing, when I want to enter Admin settings it all goes white.
Did you had some free time to check that edited conversion file of ours?
Title: Re: [SMF Converter] IPB 4.4
Post by: vbgamer45 on September 25, 2019, 11:53:51 AM
That might be a general SMF issue i would try in support boards

I did check out the sql file
Title: Re: [SMF Converter] IPB 4.4
Post by: Loshmi on September 25, 2019, 12:41:12 PM
I made it! I just had to reinstall SMF and import that mysql base that we created and filled with converted posts and members. It all works for now - posts are there, members are there, I can enter Admin area. It all looks fine for now, we'll see.
Thank you once again for all your help!
Title: Re: [SMF Converter] IPB 4.4
Post by: vbgamer45 on September 25, 2019, 01:00:37 PM
Awesome glad you have it working!
Title: Re: [SMF Converter] IPB 4.4
Post by: Loshmi on October 08, 2019, 03:21:50 PM
Hello again, so there are a couple of issues after the conversion.
First - I couldn't stay longer than 60 minutes inside the Admin panel. So I had to create a new admin during SMF install, that account doesn't have any problem (just have to re-type the password every 60 minutes).
Second - I "opened" forum today, all members had issues with their passwords. When they asked for password reset they just received this email:
QuoteDear username,
This mail was sent because the 'forgot OpenID' function has been applied to your account. Below is the OpenID that your account is associated with:


IP: *******
Username: ****
There is no password reset link or anything like that. Is this connected to the conversion or is it something else? What do you think?
Title: Re: [SMF Converter] IPB 4.4
Post by: vbgamer45 on October 08, 2019, 03:38:35 PM
Set the openid_uri to "" in the smf_members table hopefully that should help.
Title: Re: [SMF Converter] IPB 4.4
Post by: Loshmi on October 08, 2019, 04:34:53 PM
Can you please explain with few more details? I should go to phpmyadmin, then go inside members table and just type "" into that field?

QuoteThis mail was sent because the 'forgot OpenID' function has been applied to your account. Below is the OpenID that your account is associated with:
""

IP: ****
Username: *****
Title: Re: [SMF Converter] IPB 4.4
Post by: vbgamer45 on October 08, 2019, 04:58:37 PM
yes run
update  smf_members change set openid_uri = "";
Title: Re: [SMF Converter] IPB 4.4
Post by: Loshmi on October 09, 2019, 09:00:17 AM
Error
QuoteStatic analysis:

1 errors were found during analysis.

    Unrecognized keyword. (near "change" at position 15)

SQL query:

update members change set openid_uri = ""

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'change set openid_uri = ""' at line 1
Title: Re: [SMF Converter] IPB 4.4
Post by: vbgamer45 on October 09, 2019, 10:05:45 AM
My mistake tired

update  smf_members set openid_uri = "";
Title: Re: [SMF Converter] IPB 4.4
Post by: Loshmi on October 09, 2019, 11:40:27 AM
Thank you soooooooo much!!!! That's it, it worked! At least it looks like that :)
Title: Re: [SMF Converter] IPB 4.4
Post by: LuizRafael on January 09, 2020, 08:58:58 PM
Hi, i got a error using this converter...

Converting...
Converting posts (this may take some time)...
Unsuccessful!
This query:
SELECT
p.pid AS id_msg, p.topic_id AS id_topic, p.post_date AS poster_time,
CASE WHEN p.author_name = '' THEN 0 ELSE p.author_id END AS id_member, SUBSTRING(t.title, 1, 255) AS subject,
SUBSTRING(p.author_name, 1, 255) AS poster_name,
SUBSTRING(p.ip_address, 1, 255) AS poster_ip, p.use_emo AS smileys_enabled,
IFNULL(p.edit_time, 0) AS modified_time, SUBSTRING(p.edit_name, 1, 255) AS modified_name,
t.forum_id AS id_board, REPLACE(p.post, '<br />', '') AS body,
SUBSTRING(IFNULL(m.email, '[email protected]'), 1, 255) AS poster_email, 'xx' AS icon
FROM `vgforum_vgbrdataforum`.ibf_forums_posts AS p
LEFT JOIN `vgforum_vgbrdataforum`.ibf_forums_topics AS t ON (t.tid = p.topic_id)
LEFT JOIN `vgforum_vgbrdataforum`.ibf_core_members AS m ON (m.member_id = p.author_id)
WHERE t.forum_id IS NOT NULL
LIMIT 0, 500;
Caused the error:
1054


and with a DEBUG=1 option

Converting...

Notice: Array to string conversion in /home/vgforum/public_html/smf/convert.php on line 3093
Notice: Undefined variable: _SESSION in /home/vgforum/public_html/smf/convert.php on line 964
Notice: Array to string conversion in /home/vgforum/public_html/smf/convert.php on line 3093
Warning: Invalid argument supplied for foreach() in /home/vgforum/public_html/smf/convert.php on line 967
Notice: Array to string conversion in /home/vgforum/public_html/smf/convert.php on line 3093
Notice: Undefined variable: _SESSION in /home/vgforum/public_html/smf/convert.php on line 979 Successful.
Recalculating forum statistics... Get all members with wrong number of personal messages..

Notice: Array to string conversion in /home/vgforum/public_html/smf/convert.php on line 3093
Notice: Undefined variable: result in /home/vgforum/public_html/smf/convert.php on line 2486
Notice: Array to string conversion in /home/vgforum/public_html/smf/convert.php on line 3093
Notice: Undefined variable: result in /home/vgforum/public_html/smf/convert.php on line 2487
Notice: Array to string conversion in /home/vgforum/public_html/smf/convert.php on line 3093
Notice: Undefined index: db_fetch_assoc in /home/vgforum/public_html/smf/convert.php on line 1378
Fatal error: Uncaught Error: Function name must be a string in /home/vgforum/public_html/smf/convert.php:1378 Stack trace: #0 /home/vgforum/public_html/smf/convert.php(1318): doStep2() #1 /home/vgforum/public_html/smf/convert.php(51): doStep1() #2 {main} thrown in /home/vgforum/public_html/smf/convert.php on line 1378


Nevermind, i fix this with the solution in the last page (p.emo error)
Title: Re: [SMF Converter] IPB 4.4
Post by: LuizRafael on January 10, 2020, 05:24:18 PM
After end of convert, a blank page (screen) appears, no errors...

Some help please
Title: Re: [SMF Converter] IPB 4.4
Post by: boro_boy on January 14, 2020, 01:13:05 PM
Hello,

I'm trying to convert from v4.4.9.1 and i'm getting this errror:


Converting members...
Unsuccessful!
This query:
SELECT
m.member_id AS id_member, SUBSTRING(m.name, 1, 80) AS member_name,
SUBSTRING(m.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,
m.member_title AS usertitle, m.last_visit AS last_login, "" as buddy_list, "" as message_labels, "" as openid_uri, "" as ignore_boards,
m.joined AS date_registered, SUBSTRING(pc.field_3, 1, 255) AS website_url,
SUBSTRING(pc.field_3, 1, 255) AS website_title,
SUBSTRING(m.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,
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 `mfftk2co_invision`.core_members AS m
LEFT JOIN `mfftk2co_invision`.core_pfields_content AS pc ON (pc.member_id = m.member_id)

LIMIT 0, 500;
Caused the error:
1054


Any help would be greatly appreciated.
Title: Re: [SMF Converter] IPB 4.4
Post by: vbgamer45 on January 14, 2020, 01:37:59 PM
Try running that as normal sql on the database and see if you get an error back. The 1054 error is not complete for me.
It means there is some unknown column in the database.
Title: Re: [SMF Converter] IPB 4.4
Post by: boro_boy on January 14, 2020, 01:39:11 PM
ok i'll have a go now, cheers.
Title: Re: [SMF Converter] IPB 4.4
Post by: boro_boy on January 14, 2020, 01:41:49 PM
Quote from: vbgamer45 on January 14, 2020, 01:37:59 PM
Try running that as normal sql on the database and see if you get an error back. The 1054 error is not complete for me.
It means there is some unknown column in the database.

This is the error it comes up with;

#1054 - Unknown column 'pc.field_5' in 'field list'
Title: Re: [SMF Converter] IPB 4.4
Post by: vbgamer45 on January 14, 2020, 01:52:01 PM
Change this in the query and try again

CASE
WHEN (pc.field_5 = 'm') THEN 1
WHEN (pc.field_5 = 'f') THEN 2
ELSE 0
END AS gender

To

"" AS gender
Title: Re: [SMF Converter] IPB 4.4
Post by: boro_boy on January 14, 2020, 02:05:30 PM
Hello,

I change it but got this new error:

Unknown system variable 'SQL_MAX_JOIN_SIZE'

It is the file ipb44_to_smf.sql i'm editing the SQL in right?
Title: Re: [SMF Converter] IPB 4.4
Post by: boro_boy on January 14, 2020, 02:11:57 PM
Here is the result from phpMyAdmin
Title: Re: [SMF Converter] IPB 4.4
Post by: vbgamer45 on January 14, 2020, 02:17:41 PM
Yes,  ipb44_to_smf.sql you edit.
Make sure you are using the latest convert.php from github or convertors downloads.
Title: Re: [SMF Converter] IPB 4.4
Post by: boro_boy on January 14, 2020, 02:31:34 PM
Yes I'm using the latest one I just uploaded them again to make sure as I might have uploaded the one from the beginning of this thread. If this is going to be very time consuming for you then It might be better for me not to continue, but if you don't mind that would be very nice of you to help me out.

I now get this error:

Converting members...
Wrong value type sent to the database. Integer expected. (gender)

Which if I put this code


SELECT
m.member_id AS id_member, SUBSTRING(m.name, 1, 80) AS member_name,
SUBSTRING(m.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,
        m.member_title AS usertitle, m.last_visit AS last_login, "" as buddy_list, "" as message_labels, "" as openid_uri, "" as ignore_boards,
        m.joined AS date_registered, SUBSTRING(pc.field_3, 1, 255) AS website_url,
SUBSTRING(pc.field_3, 1, 255) AS website_title,
SUBSTRING(m.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,
        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,
"" AS gender
FROM {$from_prefix}core_members AS m
     LEFT JOIN {$from_prefix}core_pfields_content AS pc ON (pc.member_id = m.member_id)
;


into phpMyAdmin

I get this error (image)
Title: Re: [SMF Converter] IPB 4.4
Post by: vbgamer45 on January 14, 2020, 02:35:34 PM
Change "" AS gender to
0 AS gender
Title: Re: [SMF Converter] IPB 4.4
Post by: boro_boy on January 14, 2020, 02:47:29 PM
Thanks, slowly getting there now:

Converting members...
Successful.
Converting categories... Successful.
Converting boards...Wrong value type sent to the database. Integer expected. (id_parent)
Title: Re: [SMF Converter] IPB 4.4
Post by: vbgamer45 on January 17, 2020, 04:46:15 PM
Open .sql file
Find

// IPB stores forum names and descriptions in a seperate database table.
$result2 = convert_query("select * from {$from_prefix}core_sys_lang_words where word_key ='forums_forum_" . $row['id_board'] . "' OR word_key ='forums_forum_" . $row['id_board'] . "_desc'");
while ($row2 = convert_fetch_assoc($result2))
{
if (!empty($row2['word_default'])  && $row2['word_key'] == ('forums_forum_' . $row['id_board']))
{
$row['name'] = $row2['word_default'];
}


if (!empty($row2['word_default'])  && $row2['word_key'] == ('forums_forum_' . $row['id_board'] . '_desc') )
{
$row['description'] = $row2['word_default'];
}

}


Add after

$row['id_parent'] = (int) $row['id_parent'];

Title: Re: [SMF Converter] IPB 4.4
Post by: Dopply on January 18, 2020, 11:00:03 AM
Hello, thanks for the amazing converter! After following the troubleshooting steps in the first few things, everything has been going very smoothly. Fingers crossed it all works out!

In the meantime, I was wondering if you had a ready-made script to convert reputation over to karma? This would make the conversion literally perfect. Thanks!
Title: Re: [SMF Converter] IPB 4.4
Post by: vbgamer45 on January 18, 2020, 11:22:09 AM
I do not have a script to convert it over. I would need to know what tables the reputation is stored in.
Title: Re: [SMF Converter] IPB 4.4
Post by: Dopply on January 18, 2020, 11:52:50 AM
Quote from: vbgamer45 on January 18, 2020, 11:22:09 AM
I do not have a script to convert it over. I would need to know what tables the reputation is stored in.
Oh, okay. I've been studying it to see if I can put together one, so any help would be much appreciated.

IPB's rep is stored in core_reputation_index. The structure is as follows:



There are a couple of other tables (core_reputation_leaderboard_history and core_reputation_levels) but this one appears to be most applicable and ready to convert over into karma (or your own Likes modification).
Title: Re: [SMF Converter] IPB 4.4
Post by: kilk on June 09, 2020, 04:14:51 PM
Any converter to SMF 1.1?
Title: Re: [SMF Converter] IPB 4.4
Post by: vbgamer45 on June 09, 2020, 04:20:53 PM
For IPB 4.4 no.  The upgrade path is only for SMF 2.0.x you would need to use SMF 2.0.x to use this convertor.
Title: Re: [SMF Converter] IPB 4.4
Post by: Sokurov on March 10, 2021, 03:40:10 AM
Hi! Can somebody help to convert forum from ipb4 to smf? Not for free, for donate, in fact I don't realize it is difficult or easy task, anyway, we can discuss if it possible o_O
Title: Re: [SMF Converter] IPB 4.4
Post by: Dzonny on March 10, 2021, 06:17:55 AM
Quote from: Sokurov on March 10, 2021, 03:40:10 AM
Hi! Can somebody help to convert forum from ipb4 to smf? Not for free, for donate, in fact I don't realize it is difficult or easy task, anyway, we can discuss if it possible o_O
Have you tried available convertor? :)
Title: Re: [SMF Converter] IPB 4.4
Post by: Sokurov on March 11, 2021, 06:23:54 AM
No, not yet. Unfortunately I'm absolutely zero in IT
Title: Re: [SMF Converter] IPB 4.4
Post by: Rumpa on March 13, 2021, 08:51:08 AM
Quote from: Sokurov on March 10, 2021, 03:40:10 AM
Hi! Can somebody help to convert forum from ipb4 to smf? Not for free, for donate, in fact I don't realize it is difficult or easy task, anyway, we can discuss if it possible o_O
I can help you come inbox
Title: Re: [SMF Converter] IPB 4.4
Post by: VisiGod on November 02, 2022, 09:34:02 PM
Just to let you know that on ipb44_to_smf.sql, line 749, instead of
---* {$to_prefix}core_attachmentsit should be
---* {$to_prefix}attachments
core_attachments is on IPB, attachments is on SMF