Advertisement:

Author Topic: Converting from YaBB 2.2  (Read 151508 times)

Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: Converting from YaBB 2.2
« Reply #40 on: June 24, 2008, 01:06:31 PM »
Try changing this line.
Code: [Select]
'dateRegistered' => parse_time($data['regdate']),
to
Code: [Select]
'dateRegistered' => (int) $data['regtime'],
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Offline Gilrod

  • Semi-Newbie
  • *
  • Posts: 81
Re: Converting from YaBB 2.2
« Reply #41 on: June 24, 2008, 01:08:36 PM »
That chucked up a MySQL error...

Code: [Select]
ALTER TABLE `tnmsv3`.smf_members
ORDER BY ID_MEMBER = 0, dateRegistered;

Does one remove the = 0 from the convert.php in that query?

Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: Converting from YaBB 2.2
« Reply #42 on: June 24, 2008, 01:16:28 PM »
Yea remove the = 0
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Offline Gilrod

  • Semi-Newbie
  • *
  • Posts: 81
Re: Converting from YaBB 2.2
« Reply #43 on: June 24, 2008, 01:22:35 PM »
Ok sorted that one out, next .... :)

Code: [Select]
Incorrect date value: '' for column 'birthdate' at row 1

Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: Converting from YaBB 2.2
« Reply #44 on: June 24, 2008, 01:27:44 PM »
Change
Code: [Select]
'birthdate' => isset($data['bday']) ? ($data['bday'] == '' || strtotime($data['bday']) == 0 ? '0001-01-01' : strftime('%Y-%m-%d', strtotime($data['bday']))) : '',
to
Code: [Select]
'birthdate' => isset($data['bday']) ? ($data['bday'] == '' || strtotime($data['bday']) == 0 ? '0001-01-01' : strftime('%Y-%m-%d', strtotime($data['bday']))) : '0001-01-01',
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Offline Gilrod

  • Semi-Newbie
  • *
  • Posts: 81
Re: Converting from YaBB 2.2
« Reply #45 on: June 24, 2008, 02:45:06 PM »
Then now this is an issue too..

Code: [Select]
'lastLogin' => isset($data['lastonline']) ? $data['lastonline'] : '',
giving this error...

Code: [Select]
Incorrect integer value: '' for column 'lastLogin' at row 1

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,371
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: Converting from YaBB 2.2
« Reply #46 on: June 24, 2008, 04:49:21 PM »
MySQL must be running in strict mode for all these errors to occur..

That line can be changed to:
Code: [Select]
'lastLogin' => isset($data['lastonline']) ? $data['lastonline'] : '0',
But if mysql is in strict mode I think we will just see more errors occur..
I don't think the YaBB 2.1 converter was wrote for MySQL Strict mode..
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline Gilrod

  • Semi-Newbie
  • *
  • Posts: 81
Re: Converting from YaBB 2.2
« Reply #47 on: June 24, 2008, 04:57:28 PM »
Yeah, Jay and I realised it's a strict mode issue :-)

Typical... the next issue I'm having is this ...

Code: [Select]
Incorrect integer value: '' for column 'msgtime' at row
During step 4...

Converting personal messages... Unsuccessful!


Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: Converting from YaBB 2.2
« Reply #48 on: June 24, 2008, 04:58:29 PM »
Yea I talked to him via IM and MySQL is running in strict mode.  The converter needs to be updated to support strict mode.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,371
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: Converting from YaBB 2.2
« Reply #49 on: June 24, 2008, 05:12:13 PM »
Gilrod,

I hope you don't mind testing :)

Let me know how this one works out. I made changes and hopefully found all columns that need specified correctly
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline Gilrod

  • Semi-Newbie
  • *
  • Posts: 81
Re: Converting from YaBB 2.2
« Reply #50 on: June 24, 2008, 05:16:06 PM »
No problems man, am just sat on my sofa watching sh!t TV ;-)


Offline Gilrod

  • Semi-Newbie
  • *
  • Posts: 81
Re: Converting from YaBB 2.2
« Reply #51 on: June 24, 2008, 05:20:33 PM »
That script doesn't give any output, you did something wrong I think :)

Would it be quicker to do this via IM ?

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,371
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: Converting from YaBB 2.2
« Reply #52 on: June 24, 2008, 05:27:09 PM »
oops,
I didn't even check for syntax errors.

Fixed in this one
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline Gilrod

  • Semi-Newbie
  • *
  • Posts: 81
Re: Converting from YaBB 2.2
« Reply #53 on: June 25, 2008, 04:41:48 AM »
Morning Gents,
Sleepy, here's the latest error :)

Code: [Select]
Converting notifications... Successful.
Unsuccessful!
This query:

    ALTER TABLE `tnmsv3`.smf_messages
    CHANGE COLUMN ID_MSG ID_MSG int(10) unsigned NOT NULL default 0,
    DROP PRIMARY KEY,
    DROP INDEX topic,
    DROP INDEX ID_BOARD,
    DROP INDEX ID_TOPIC,
    DROP INDEX ID_MEMBER,
    ADD COLUMN temp_filename tinytext NOT NULL default '';

Caused the error:

    BLOB/TEXT column 'temp_filename' can't have a default value

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,371
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: Converting from YaBB 2.2
« Reply #54 on: June 25, 2008, 01:33:09 PM »
Ah dang.

Find:
Code: [Select]
                    'temp_filename' => "ADD COLUMN temp_filename tinytext NOT NULL default ''",
Replace:
Code: [Select]
                    'temp_filename' => "ADD COLUMN temp_filename tinytext(6) NOT NULL default ''",
A 6 should do it for tinytext.

That part of the query only happens though when the uploads directory exists.

The sad thing is that was step 10 and it took a while to get there.
We could cheat a little I believe and after the start of all the other steps before step 10. We just have it do a return.
It would mean we modify the file in 9 places previous to this so we just skip over the rest of the converter sections.
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline Gilrod

  • Semi-Newbie
  • *
  • Posts: 81
Re: Converting from YaBB 2.2
« Reply #55 on: June 25, 2008, 06:10:52 PM »
Got another for you ...

Code: [Select]
Unsuccessful!
This query:

    ALTER TABLE `tnmsv3`.smf_messages
    CHANGE COLUMN ID_MSG ID_MSG int(10) unsigned NOT NULL default 0,
    DROP PRIMARY KEY,
    DROP INDEX topic,
    DROP INDEX ID_BOARD,
    DROP INDEX ID_TOPIC,
    DROP INDEX ID_MEMBER,
    ADD COLUMN temp_filename tinytext(6) NOT NULL;

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 '(6) NOT NULL' at line 8

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,371
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: Converting from YaBB 2.2
« Reply #56 on: June 26, 2008, 01:14:53 AM »
Did the changes we made over MSN get you any further since I last seen you?
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline Gilrod

  • Semi-Newbie
  • *
  • Posts: 81
Re: Converting from YaBB 2.2
« Reply #57 on: June 26, 2008, 03:50:19 AM »
That is what happened after the fix... I did send it back to you in msn, however you never came back to me, so I assumed you were busy.

Just so I know I'm not fooking this up...

We wanted to change this ...
Code: [Select]
'temp_filename' => "ADD COLUMN temp_filename tinytext(6) NOT NULL default ''",
to this ...

Code: [Select]
'temp_filename' => "ADD COLUMN temp_filename tinytext(6) NOT NULL",
Stew.
« Last Edit: June 26, 2008, 03:51:57 AM by Gilrod »

Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: Converting from YaBB 2.2
« Reply #58 on: June 26, 2008, 10:20:05 AM »
tinytext fields have a predefined size.  You can't specify a size for it unless it's a varchar column.

Code: [Select]
'temp_filename' => "ADD COLUMN temp_filename tinytext NOT NULL",
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Offline Gilrod

  • Semi-Newbie
  • *
  • Posts: 81
Re: Converting from YaBB 2.2
« Reply #59 on: June 26, 2008, 11:43:53 AM »
And the next step ...

Code: [Select]
Converting posts (part 1 - this may take some time)... Unsuccessful!
This query:

    INSERT INTO `tnmsv3`.smf_messages
    (ID_TOPIC, ID_BOARD, subject, posterName, posterEmail, posterTime, icon, posterIP, body, smileysEnabled, modifiedTime, modifiedName, temp_filename)
    VALUES ('3166', '5', 'Rush - what are they like?', 'Matt_Callow', **************', '1071598776', 'xx', '217.206.177.18', 'There\'s a bit of a discussion going on over here...<br>http://www.melodicrock.com/phorum33/list.php?f=1<br><br>Enjoy!', '', '0', '', ''),
    ('3166', '5', 'Re: Rush - what are they like?', 'Slim', '**************', ', '1071599686', 'xx', '62.253.32.5', 'I see some poor soul has described [i]Counterparts[/i] as a \'true masterpiece\' lmao<br><br>Very sad .. ;D<br><br>', '1', '0', '', ''),
    ('3166', '5', 'Re: Rush - what are they like?', 'Reg_Sweeting-Jones', '**************', ', '1071610023', 'xx', '81.86.90.146', '[quote]I see some poor soul has described [i]Counterparts[/i] as a \'true masterpiece\' lmao<br /><br />Very sad .. ;D<br /><br />[/quote]<br>Truly deranged.', '1', '0', '', ''),
    ('3166', '5', 'Re: Rush - what are they like?', 'Neil_Pudney', '**************', ', '1071615333', 'xx', '80.46.152.4', '[quote]I see some poor soul has described [i]Counterparts[/i] as a \'true masterpiece\' lmao<br /><br />Very sad .. ;D<br /><br />[/quote]<br> Glad to see you\'ve put them right :-)', '1', '0', '', ''),
    ('3166', '5', 'Re: Rush - what are they like?', 'Jon_M', 'j**************', , '1071634845', 'xx', '62.6.139.12', 'Well, they\'re like a little rabbit really...', '1', '0', '', ''),
    ('3166', '5', 'Re: Rush - what are they like?', 'Dave_Lack', '**************', ', '1071797572', 'xx', '81.101.68.134', 'Can\'t wait for the Counterparts debate..... ;)', '1', '0', '', '');

Caused the error:

    Incorrect integer value: '' for column 'smileysEnabled' at row 1