News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Converting from YaBB 2.2

Started by unpossible, January 03, 2008, 11:15:44 PM

Previous topic - Next topic

JayBachatero

No news.  I've been pretty busy with other things :(.
Follow me on Twitter

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

Rovin


oldYabber

I also made it to the polls portion going back to the yabb21_to_smf.php script and deleting "= 0" and there it quit.
I viewed my board and it had and the different boards and categories but no members or messages so I quit. Would rolling back to 2.1 and trying again work better?

SleePy

id you get any other errors?
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

oldYabber

Nope. It seemed there were only two options. Hit the try again button infinitum or just close the window. Then I went to index php and there was my message board but no messages or members. Then I got frustrated with YaBButt  for the umpteenth time since 1Gold and quit like a big sissy.

SleePy

I don't see a Yabb 2.2 converter. I might of missed it though.
If it isn't already, you can add it to our converter requests page and hopefully when time permits for us who are making converters we can get to them.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Gilrod

Hmmmm I've wanting to convert my YaBB 2.2.1 site to smf, so am using the latest converter I can find, however this is all that happens ...

Converting...
Converting membergroups... Successful.
Converting members...


In the Browser status line it says "Done" this is in IE and FF2/3 any ideas?!

Stewart

SleePy

How big of a forum do you have Gilrod?
If you have a really big forum, using the command line converter may be the only way :|
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Gilrod

Not really ...

Total Topics:     27635
Total Posts:    940524
Total Members:    1911

I'd expect to see it refreshing every 20-30 seconds, but nothing it just sits there and does nothing.

ThorstenE

#29
QuoteI'd expect to see it refreshing every 20-30 seconds
this means converter is already working. A conversion of 940.000 Post will take long time (up to several hours).
my old phpbb was converted in 2 Hours (250.000 Posts)

try the command-line-version (only possible, if you have shell access  to the host), it should be a little bit faster:
/path/to/php/php -f /path/to/convert.php --path_to=/path/to/smf --path_from=/path/from/yabb --db_pass=xxxx --convert_script=yabb21_to_smf.sql --debug




Gilrod

Ok I think you missed something ...

It's "failing" in the member convert, it doesn't even get to the posts conversion yet.

And am actually trying to run it on a Windows Server.

SleePy

Add ?debug=1 to the end of the url.
This should put it into debug mode, hopefully it will spit out more errors or information that can lead us to the issue.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Gilrod

Interesting, well 1 of the settings paths.pl was wrong, fixed that and here's what I get...

Caused the error:

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


There was a LOT of rubbish that was printed prior to that, is it worth posting that too?

SleePy

#33
It may be.  Most likely though it was the query it was trying to execute.

Edit,
Though try this.
Open the yabb21_to_smf.php

Find:

'gender' => $userData[11],


replace:

'gender' => (int) $userData[11],


That should hopefully force it to be cast as an integer and satisfy the database.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Gilrod

#34
Same error...

Basically I think it's down to the fact that we don't ask our members to specify sex, so all the values are blank. Can't I just remove that line?

Interestingly if I removed that line you mentioned the error still comes up, so I looked for "gender" again, and this line seems to be the culprit, if I remove it the error is different ..

'gender' => isset($data['gender']) ? ($data['gender'] == 'Male' ? 1 : ($data['gender'] == 'Female' ? 2 : 0)) : '',


SleePy

               'gender' => 0,

You could change it to that. It would force it to be 0 for all members. Which is unspecified when SMF translates it for its gender field.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Gilrod

Here's my own member info details...

### User variables for ID: admin ###

'password',"REMOVED"
'realname',"Stewart"
'email',"REMOVED"
'regdate',"07/05/05 at 19:00:00"
'regreason',""
'webtitle',""
'weburl',""
'spamcount',""
'spamtime',""
'signature',"[url=http://ps3tag.com/cards/view/493][img]http://ps3tag.com/cards/../files/cards/493.jpg[/img][/url]"
'postcount',"192"
'position',"Administrator"
'addgroups',"4"
'icq',""
'aim',""
'yim',""
'skype',""
'gender',""
'usertext',""
'userpic',"blank.gif"
'regtime',"1120604400"
'location',""
'bday',""
'timeselect',"4"
'timeoffset',"0"
'timeformat',"MM D+ YYYY @ HH:mm:ss*"
'hidemail',"checked"
'msn',""
'gtalk',""
'template',"TNMS 2007"
'language',"English"
'lastonline',"1214251972"
'lastpost',"1214078442"
'lastim',"1213632449"
'im_ignorelist',""
'im_notify',"1"
'im_popup',"on"
'im_imspop',""
'cathide',""
'postlayout',"130|425|11"
'session',"REMOVED"
'sesquest',"password"
'sesanswer',"REMOVED"
'favorites',""
'dsttimeoffset',"1"
'pageindex',"1|1|1"
'lastips',"192.168.7.197|78.32.110.249|78.32.67.168"
'onlinealert',""
'pmactprev',""
'pmmessprev',""
'pmviewMess',""
'buddylist',""
'offlinestatus',"offline"
'awaysubj',""
'awayreply',""
'awayreplysent',""
'stealth',""



Gilrod

#37
Right after some investigating the following lines in yabb21_to_smf.php cause the first set of problems ...


'gender' => isset($data['gender']) ? ($data['gender'] == 'Male' ? 1 : ($data['gender'] == 'Female' ? 2 : 0)) : '',

'dateRegistered' => parse_time($data['regdate']),

'birthdate' => isset($data['bday']) ? ($data['bday'] == '' || strtotime($data['bday']) == 0 ? '0001-01-01' : strftime('%Y-%m-%d', strtotime($data['bday']))) : '',

'lastLogin' => isset($data['lastonline']) ? $data['lastonline'] : '',


The entire PM conversion fails, looking at some of the lines, they imply that the order of the data in the YaBB format is not what is expected, here is how it appears in the yabb .msg file ...

113419747019612|derrydale||||Re: (No subject)|1134215470|Hi Alan, thanks for this. My address:<br><br>MESSAGE REMOVED|113419747019612|0|82.34.168.xx|s|||

I'm new to php, being a relatively amateurish Perl coder as well, so am a little unsure about how things are referenced etc, but as I said the php implies that format for the expected data is different ...


'fromName' => substr(htmlspecialchars($userData[$i][0]), 0, 255),


The above is the item that references the "From user" is the [0] after $userData the reference to the first entry in the YaBB data? if so it's actually the time stamp.

I commented out the entire 4th step and then it says it's finished, but obviously there are NO posts/messages at all.

Thanks in advance if anyone can help.

Stewart

SleePy

change:
'gender' => isset($data['gender']) ? ($data['gender'] == 'Male' ? 1 : ($data['gender'] == 'Female' ? 2 : 0)) : '',

to
'gender' => isset($data['gender']) ? ($data['gender'] == 'Male' ? 1 : ($data['gender'] == 'Female' ? 2 : 0)) : '0',

Does it get though the gender conversion now?
What is the step it is failing on?
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Gilrod

In my previous post, for my tests I literally commented out each of those 4 lines that it failed on during step2.

Doing the change you've just suggested for "gender" worked.

Now it's failing on "Incorrect integer value: '' for column 'dateRegistered' at row 1"


Advertisement: