News:

Wondering if this will always be free?  See why free is better.

Main Menu

IPV 1.2

Started by Mareid, September 21, 2010, 09:04:09 AM

Previous topic - Next topic

Mareid

Any chance there will be a converter to convert from Invision Power Board 1.2 (which I'm using) to SMF 2 RC3?  My host said they would do the conversion but they did not do it correctly apparently as none of the original data is visible.  Which probably means the database is full of junk and I'll have to do another installation of SMF (ok since it's empty as far as I can tell heh)

Norv

Hello there!
You might want to try using the converter we have, for IPB. Please see: http://download.simplemachines.org/index.php?thanks;filename=smf_2-0-rc3_invision_converter.zip

Also, the guide to converting: Converting to SMF

Even before trying it, I would say that maybe it's better if you try running a few maintenance tools on your current SMF (Admin > maintenance, like "recount forum statistics" and/or "find and repair errors"), to see if by any chance it makes any difference on the forum you currently have installed.
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

Mareid

welp, I ran as much maintenance as I could.  I started the conversion and I get this error:

Converting members...Wrong value type sent to the database. Date expected. (birthdate).  I'm wondering if I go into the original forum and add a birthdate to everyone, if that would do the trick. 

It appears to hang after throwing off this error.

Mareid

I went into the IVB tables and directly edited the birthdates so that every single one was valid and I'm still getting the same error

Mareid

OK, got through the birthday knothole...found an error in the table, and now have a new error.  This one has me stumped as there is no instant_messages field in either table as far as I can tell

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

Really all I want is a conversion of the existing members (about 30) with their profile data, and their postings.  All the other stats I could care less about.  Don't know if that is helpful information :(

Norv

Please replace: (invision_to_smf.sql):

msg_total AS instant_messages,


IFNULL(msg_total, 0) AS instant_messages,
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

Mareid

making a bit of progress, thanks so much...now the message is

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

Does not appear to be such a field as pm_email_notify or anything equivalent.


Where I can find the entry in the table I've corrected it to integer or whatever from NULL (or whatever) but the missing fields are hard for me to figure out.

Norv

Yes, it is only in SMF...
Please try replacing (same sql file):

email_pm AS pm_email_notify


IFNULL(email_pm, 0) AS pm_email_notify
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

Mareid

YES!  Now I am making some progress.  I've been hand editing the corresponding fields when I get an error and that seems to be working

Mareid

You have been very helpful and I'm very grateful, and apologize for bugging you so much.  I've tried to look at the code to see where it's getting hung up...

I am now past converting the members, but am hanging here...

Converting topics...Wrong value type sent to the database. Integer expected. (id_poll).  It looks like this is the line in the code


   pl.pid AS id_poll, t.posts AS num_replies, t.views AS num_views,

and I have looked at the tables and all of the pid's in the table look like proper integers.  the name of the table is ibf_polls and both the pid's and tid's look fine.  Should the line of code read t.pid instead of pl.pid?
No doubt I'm missing something here, just a beginner really.

Norv

I'd suggest to try first the same kind of replacement: (same file)

pl.pid AS id_poll


IFNULL(pl.pid, 0) AS id_poll
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

Mareid

Thanks again.  That worked.  I also had another error, relating to edit time and I replaced the code with a similar line...
p.edit_time AS modified_time,  replaced with IFNULL( p.edit_time,0).  That got me through "converting polls".  However now there is a more serious error that I don't have a clue how to correct.

Converting poll options...
Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/rfamily/public_html/forum/convert.php on line 1296

//this error line is repeated multiple times

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/rfamily/public_html/forum/convert.php on line 1296

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/rfamily/public_html/forum/convert.php on line 2634

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/rfamily/public_html/forum/convert.php on line 2634

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/rfamily/public_html/forum/convert.php on line 2634

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/rfamily/public_html/forum/convert.php on line 2634

Warning: Invalid argument supplied for foreach() in /home/rfamily/public_html/forum/convert.php on line 2646

Warning: array_combine() [function.array-combine]: Both parameters should have an equal number of elements in /home/rfamily/public_html/forum/Sources/Subs-Db-mysql.php on line 641
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


Mareid

Well, it did enough of a conversion that I'm very happy with what I have and I appreciate all the help that you all have given me.!

Norv

Sorry to see it didn't actually finish... there obviously is a (more serious) problem with polls.
If I may give an advice here, you could rather remove simply all the polls only, and finish the rest, i.e. remove from invision_to_smf.sql these lines:



/******************************************************************************/
--- Converting polls...
/******************************************************************************/

TRUNCATE {$to_prefix}polls;
TRUNCATE {$to_prefix}poll_choices;
TRUNCATE {$to_prefix}log_polls;

---* {$to_prefix}polls
SELECT
p.pid AS id_poll, SUBSTRING(p.poll_question, 1, 255) AS question,
p.starter_id AS id_member, SUBSTRING(mem.name, 1, 255) AS poster_name
FROM {$from_prefix}polls AS p
LEFT JOIN {$from_prefix}members AS mem ON (mem.id = p.starter_id);
---*

/******************************************************************************/
--- Converting poll options...
/******************************************************************************/

---* {$to_prefix}poll_choices
---{
$no_add = true;
$keys = array('id_poll', 'id_choice', 'label', 'votes');

$choices = @unserialize(stripslashes($row['choices']));

if (is_array($choices))
foreach ($choices as $choice)
{
$choice = addslashes_recursive($choice);
$rows[] = "$row[id_poll], SUBSTRING('" . implode("', 1, 255), SUBSTRING('", $choice) . "', 1, 255)";
}
---}
SELECT pid AS id_poll, choices
FROM {$from_prefix}polls;
---*

(exactly like this, with the starting and ending comment-like lines.
And the conversion will then continue. But it won't have polls.

On the other hand, it may really help if you wish to do this: login in phpmyadmin (as offered by your host most likely), select the IPB database, and there, the table your_ibp_prefix_polls, go to the Export tab and choose "Structure" only (uncheck "Data"), and check the option to save to a file. Attach that file here. Also, it may help if you could do the exact same thing with table your_ibp_prefix_voters.
If you choose "structure" and do NOT choose "data", nothing of the data about your forum - i.e. nothing confidential - will be saved in the files, so if you wish, you could attach them here. (if you wish, you could also PM me)
If you want, of course.

Seeing what they look like, I may see what is wrong with our conversion of polls and fix it for next time. :)
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

Mareid

I will give it a try when I get back from vacation.  In the meantime got a couple of questions...

I did notice that even thought the users and topics got transferred, pretty much intact, any pictures that people had posted were not transferred (or possibly just not linked). 

Having run the convert a bunch of times, making one correction, running it again and so on...I assumed that the data would not actually be transferred till the program finished sucessfully.  One of my users alerted me to the fact that the new forum seemed to be working.  So is there likely to be duplicate data in the new db from the multiple passes I made?

Mareid

#15
I am uploading two versions of each table...a spreadsheet (open office calc) and a sql file.  Hope that works for you

Norv

Quote from: mareid on September 23, 2010, 02:15:12 PM

Having run the convert a bunch of times, making one correction, running it again and so on...I assumed that the data would not actually be transferred till the program finished sucessfully.  One of my users alerted me to the fact that the new forum seemed to be working.  So is there likely to be duplicate data in the new db from the multiple passes I made?

The data is transfered, it really is, step by step, table by table. So the messages were transfered when it said it's at that respective step.
Now, only with messages the forum might not work as expected. (for example for posts to work, to be able to browse through them normally) the forum needs to have both a topics table and a messages table.
That's just an example. Partial data will be there.
Or, users might have - or might miss so far - the notifications they have set for topics or boards. Etc...

When the conversion starts again, it wipes the table it is currently doing, and starts doing it from the beginning (re-transferring it).
So you might NOT want to start fully using the forum, let people post, then make the conversion on THAT forum... it may wipe what they did meanwhile and replace them all with the old data from IPB again. :)

Thank you for the tables. I am taking a look...
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

Mareid

I realized I had another problem while looking at the new table...all attachments from the previous forum are missing, all of which would have been .jpg, .gif and possibly .png.  Custom avatars didn't come over either.  None of this is a disaster, although I would like to have the pictures re-attached if we can get the converter working.  I'll have to think about how to save any postings that are made between now and then.  I'm heading out of the country for a couple of weeks, and I wanted the new forum on line before I left.  I'll just live with it if I lose a few recent posts (or copy them to the old db before converting it)

Norv

The problem is that the converter didn't finish the job. It stopped there, at polls, and didn't do the rest. Among the rest, there are attachments.

I'd suggest to remove those lines as said before and re-do the conversion without polls. That'd be the quicker option so far.

Or, you could have another option, still: you could install a SMF 1.1.11 (which has less features than 2.0 and is a bit old now), but the conversion should succeed on it (afaik it was quite tested, while this one wasn't). And after it finishes successfully, you can always upgrade it to SMF 2.0.
Please note that if you do try that option (conversion to 1.1.11) then you'll want to make another database... (and make sure the user to it does have access to IPB database again), and install a 1.1.11, and take another converter package from this site's Downloads > Converters.
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

Mareid

#19
took the lines out, and it got a lot further...still have the following errors

Converting personal messages (step 1)...
Successful.
Converting personal messages (step 2)... Successful.
Converting topic notifications... Successful.
Converting board notifications... Successful.
Converting moderators... Successful.
Converting permissions...
Notice: Use of undefined constant id_group - assumed 'id_group' in /home/rfamily/public_html/forum/convert.php(1099) : eval()'d code on line 46
Successful.
Converting board permissions... Successful.
Converting smileys... Successful.
Converting settings...
Parse error: syntax error, unexpected T_ARRAY, expecting ')' in /home/rfamily/public_html/forum/convert.php(1099) : eval()'d code on line 4

I removed all the polls code plus, including some stuff you didn't mention  but that was related to poll count or something like that.  It got a lot farther, but stalled in the settings conversion code.

Mareid

Would it be possible to set the converter so that if there's an existing forum with a different name in the SMF forum, it wont be deleted?  That way I could allow my users to post, and move the posts to the new forum before running the converter. 

Norv

About the last error...
Please replace (invision_to_smf.sql)

convert_insert('settings', array('variable', 'value'),
array(
array('hotTopicPosts', $INFO['hot_topic'])
array('defaultMaxMessages', $INFO['display_max_posts'])
array('defaultMaxTopics', $INFO['display_max_topics'])
array('spamWaitTime', $INFO['flood_control'])
array('onlineEnable', $INFO['allow_online_list'])
), 'replace');


convert_insert('settings', array('variable', 'value'),
array(
array('hotTopicPosts', $INFO['hot_topic']),
array('defaultMaxMessages', $INFO['display_max_posts']),
array('defaultMaxTopics', $INFO['display_max_topics']),
array('spamWaitTime', $INFO['flood_control']),
array('onlineEnable', $INFO['allow_online_list']),
), 'replace');


It would be possible to avoid deleting posts by skipping the entire steps which convert posts. Only run the last steps of the conversion. Though it wasn't meant to be run that way, and some statistics and other final cleanup might lead to surprises.
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

Mareid

I took your suggestion and reverted my users to the old ipb till I can get a clean conversion. I will be in the UK for 10 days with (most likely) no computer access so I can't test the new code you sent  me till I get back. I'll be back in touch then.

Norv

Okay.
I'm setting this topic as unsolved, and will post the fixed converter file meanwhile. Thank you for your patience, and have fun over there! :)
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

Mareid

More progress:

removed the poll code and changed the settings code to the code above.  Still getting errors though...here's the log

Converting members... Successful.
Converting categories... Successful.
Converting boards... Successful.
Converting topics... Successful.
Converting posts (this may take some time)... Successful.
Converting personal messages (step 1)... Successful.
Converting personal messages (step 2)... Successful.
Converting topic notifications... Successful.
Converting board notifications... Successful.
Converting moderators... Successful.
Converting permissions...
Notice: Use of undefined constant id_group - assumed 'id_group' in /home/rfamily/public_html/forum/convert.php(1099) : eval()'d code on line 46
Successful.
Converting board permissions... Successful.
Converting smileys... Successful.
Converting settings...
Fatal error: Call to undefined function updateSettingsFile() in /home/rfamily/public_html/forum/convert.php(1099) : eval()'d code on line 9

Mareid

Any progress on the converter?

Mareid

I got a full conversion (and very nice it is too!) from converting ipb--->smf 1.1.x----->smf 2.0 rc3.  Many thanks for all the help.  And I would advise anyone who wants to go from IPB to SMF 2 RC to do it that way.  Took a Loooooong time, but worked perfectly!

Advertisement: