View Full Version : Problems importing from wowbb
Marco van Herwaarden
Fri 6th May '05, 5:26pm
I am trying to import a wowbb board into vB.
All seem to go well until the import of Forums. Even when number to process at a page is set to 1, it will first import a bunch of Categories, then it will loop on the next page "Importing 1 forums". No matter how i long i keep this running, it just loops the same page all over with the first forumid.
Marco van Herwaarden
Sat 7th May '05, 8:53am
Ok have been looking into it and it seems there is a small bug in the wowbb/005.php.
Find:
$sessionobject->set_session_var($class_num, 'FINISHED');
$sessionobject->set_session_var('forums', 'done');
$sessionobject->set_session_var('module', '000');
$sessionobject->set_session_var('autosubmit', '0');
}
$sessionobject->set_session_var('forumsstartat',$forum_start_at+$f orum_per_page);
}
$displayobject->update_html($displayobject->print_redirect('index.php'));
}// End resume
}//End Class
And replace by:
$sessionobject->set_session_var($class_num, 'FINISHED');
$sessionobject->set_session_var('forums', 'done');
$sessionobject->set_session_var('module', '000');
$sessionobject->set_session_var('autosubmit', '0');
$displayobject->update_html($displayobject->print_redirect('index.php','1'));
}
$sessionobject->set_session_var('forumstartat',$forum_start_at+$fo rum_per_page);
$displayobject->update_html($displayobject->print_redirect('index.php'));
}
$displayobject->update_html($displayobject->print_redirect('index.php'));
}// End resume
}//End Class
Redirects where not complete AFAIK and it should have been "set_session_var('forumstartat'" instead of "set_session_var('forumsstartat'".
Also i noticed that there are some references to phpbb2 in this script.
Marco van Herwaarden
Sat 7th May '05, 9:27am
Getting error messages on Polls:
Importing 1 polls
From : 7 :: To : 8
Got poll and DID NOT attach voters
Problem with poll on thread 5085
PS Even with errors it will just return to the index page after completion, so difficult to see the errors.
Marco van Herwaarden
Sat 7th May '05, 12:11pm
ok next "problem".
When importing the attachments there seems to be a corrupted attachment in the source wowbb database. Everything is valid, but size of the attachment is zero (0).
Strange thing now is that the size is determined correct and stored with "$try->set_value('nonmandatory', 'filesize'," correctly. When hte value is used lateron it is however not returning zero, but NULL/Empty. This will cause an SQL-error:
Database error in vBulletin:ImpEx Target 3.0.7:
Invalid SQL:
UPDATE attachment
SET
filedata = '',
filesize =
WHERE attachmentid = 607
mysql 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 'WHERE attachmentid = 607' at line 5
mysql error number: 1064
Date: Saturday 07th of May 2005 02:47:00 PM
Script: http://localhost/sataid/impex/index.php
Referer: http://localhost/sataid/admincp/
Username: Admin
IP Address: 127.0.0.1
Solved it for now by adding an intval() around the filesize value in the UPDATE queries.
Marco van Herwaarden
Mon 9th May '05, 5:30pm
Jerry just a shameless bump, now i see you're online.
My first local test completed with the modifications mentioned above, but i would like to do the next production test with stock version of ImpEx.
Any chance you have some time shortly to fix this in the downloadable version?
If not also no problem, then we will just continue with a local copy.
Jerry
Mon 9th May '05, 5:32pm
I'll look at it now.
Marco van Herwaarden
Mon 9th May '05, 5:42pm
If you need testdata just let me know.
Jerry
Mon 9th May '05, 5:49pm
No idea how forumsstartat was wrong as the imports are build with a CASE tool from templates, though something must of happened.
Can't find any phpBB cut'n'paste or residue in my copy of 005.php
Have added invals to ImpExDatabase for the filesizing to force a 0 on null size.
I'd need a copy of the source database to debug the polls issue.
Marco van Herwaarden
Mon 9th May '05, 6:06pm
Thanks for looking into it so quickly.
Will upload a backup of wowbb to my server, so you can download. Will PM you when upload is finished.
Downloaded on 18-04 a version of 005.php dated 2005/03/03 02:10:44. It contained the following code:
else
{
$sessionobject->add_error('warning',
$this->_modulestring,
get_class($this) . "::import_category failed for " . $cat['cat_title'] . " get_phpbb2_categories_details was ok.",
'Check database permissions and user table');
$sessionobject->set_session_var($class_num . '_objects_failed',$sessionobject->get_session_var($class_num. '_objects_failed') + 1 );
$displayobject->display_now("<br />Got category " . $cat['cat_title'] . " and <b>DID NOT</b> imported to the " . $target_database_type . " database");
}
But if it is already gone in your copy.
Not sure if intval's would be the best solution. Was wondering myself why NULL is returned when retrieving a value that was stored as 0? If the 0 would be retrieved you wouldn't have to block the symptoms by adding intval's.
Sorry rumbling on waiting for the upload to finish.
Jerry
Mon 9th May '05, 11:07pm
The Polls are imported, the errors are that the voters are not, in the test data I have there are not voter values in the dB or options for that matter so I can't guess what that would be.
Marco van Herwaarden
Tue 10th May '05, 2:05am
Ok, not much you can do if there is no input data. Thanks for looking into it.
vBulletin® v3.8.0 Beta 4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.