Impex Nightmare
After purchase of vBulletin Blog i was expecting Jelsoft to release Impex for vblogetin. Finally they released the impex yesterday and this turned my sunday exactly to a Bloddy Sunday. Thats why i strongly advise everyone who plans to import data to their vBulletin blog wait for the fixes.
The first problem was a missing file (ImpExDatabase_blog_001.php) inside impex. Because of this missing file impex didn't function at all. After waiting like 8 hour 45 minutes Jerry upload the file to impex and the main nightmare started.
On the first step of impex i started to receive a database error regarding When i checked the vBulletin Blog table structure and compared it with impex i found that the problem was related on a mistype on Impex. In order to solve the issue I edited and corrected these mistakes.
Fix :
Find all instances of subscribepost inside the following files and replace them with subscribeentry
ImpExModule.php line 101
impex_language.php line 491
vbfields.php line 598 - 600 - 601 - 602 - 603 - 604
After this fix i succesfully runned the first step. On the second step there is a huge logic mistake and in order to import any administrators entries you need to take admin privilidges from them. After second step i immediately started to receive database errors again. After deeply checking i found two other mis configure queries which caused the errors. The first database error i received is
As there is no posts fields inside blog_user table you need to correct the query at ImpExDatabase_blog_001.php file.
Find
Replace this with
P.S : Carefull eyes will see that i removed another field named uncatposts because this is also not needed by vBulletin Blog.
P.S 2: Because of the 10000 character limit the remaining is on the first comment
The first problem was a missing file (ImpExDatabase_blog_001.php) inside impex. Because of this missing file impex didn't function at all. After waiting like 8 hour 45 minutes Jerry upload the file to impex and the main nightmare started.
On the first step of impex i started to receive a database error regarding
Code:
mpEx Database errormysql error: Invalid SQL: DESCRIBE blog_subscribepost importblogsubscribepostid
Fix :
Find all instances of subscribepost inside the following files and replace them with subscribeentry
ImpExModule.php line 101
impex_language.php line 491
vbfields.php line 598 - 600 - 601 - 602 - 603 - 604
After this fix i succesfully runned the first step. On the second step there is a huge logic mistake and in order to import any administrators entries you need to take admin privilidges from them. After second step i immediately started to receive database errors again. After deeply checking i found two other mis configure queries which caused the errors. The first database error i received is
Code:
ImpEx Database errormysql error: Invalid SQL: INSERT INTO blog_user ( bloguserid, importbloguserid, title, description, options, viewoption, comments, lastblog, lastblogid, lastblogtitle, lastcomment, lastcommenter, lastblogtextid, posts, allowsmilie, subscribeown, subscribeothers, moderation, deleted, draft, options_everyone, options_buddy, options_ignore, ratingnum, ratingtotal, rating, pending, uncatposts ) VALUES ( '9489', '4', 'title', 'description', '0', 'all', '0', '0', '0', '', '0', '', '0', '116', '1', 'none', 'none', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0' ) mysql error: Unknown column 'posts' in 'field list' mysql error number: 1054 Date: Monday 03rd 2007f September 2007 01:02:04 AM Database: serenity MySQL error:
Find
Code:
$Db_object->query("
INSERT INTO {$tableprefix}blog_user
(
bloguserid, importbloguserid, title, description, options,
viewoption, comments, lastblog, lastblogid,
lastblogtitle, lastcomment, lastcommenter, lastblogtextid,
posts, allowsmilie, subscribeown, subscribeothers,
moderation, deleted, draft, options_everyone,
options_buddy, options_ignore, ratingnum, ratingtotal,
rating, pending, uncatposts
)
VALUES
(
'" . intval($this->get_value('mandatory', 'bloguserid')) . /* Default : 0 Type : int(10) unsigned */ "',
'" . intval($this->get_value('mandatory', 'importbloguserid')) . "',
'" . addslashes($this->get_value('nonmandatory', 'title')) . /* Default : Type : varchar(255) */ "',
'" . addslashes($this->get_value('nonmandatory', 'description')) . /* Default : Type : mediumtext */ "',
'" . intval($this->get_value('nonmandatory', 'options')) . /* Default : 0 Type : int(10) unsigned */ "',
'" . $this->enum_check($this->get_value('mandatory', 'viewoption'), array('all','only','except'), 'all') . /* Default : all Type : enum('all','only','except') */ "',
'" . intval($this->get_value('nonmandatory', 'comments')) . /* Default : 0 Type : int(10) unsigned */ "',
'" . intval($this->get_value('nonmandatory', 'lastblog')) . /* Default : 0 Type : int(10) unsigned */ "',
'" . intval($this->get_value('nonmandatory', 'lastblogid')) . /* Default : 0 Type : int(10) unsigned */ "',
'" . addslashes($this->get_value('nonmandatory', 'lastblogtitle')) . /* Default : Type : varchar(255) */ "',
'" . intval($this->get_value('nonmandatory', 'lastcomment')) . /* Default : 0 Type : int(10) unsigned */ "',
'" . addslashes($this->get_value('nonmandatory', 'lastcommenter')) . /* Default : Type : varchar(100) */ "',
'" . intval($this->get_value('nonmandatory', 'lastblogtextid')) . /* Default : 0 Type : int(10) unsigned */ "',
'" . intval($this->get_value('nonmandatory', 'posts')) . /* Default : 0 Type : int(10) unsigned */ "',
'" . intval($this->get_value('nonmandatory', 'allowsmilie')) . /* Default : Type : smallint(5) unsigned */ "',
'" . $this->enum_check($this->get_value('mandatory', 'subscribeown'), array('none','usercp','email'), 'none') . /* Default : none Type : enum('none','usercp','email') */ "',
'" . $this->enum_check($this->get_value('mandatory', 'subscribeothers'), array('none','usercp','email'), 'none') . /* Default : none Type : enum('none','usercp','email') */ "',
'" . intval($this->get_value('nonmandatory', 'moderation')) . /* Default : Type : int(10) unsigned */ "',
'" . intval($this->get_value('nonmandatory', 'deleted')) . /* Default : Type : int(10) unsigned */ "',
'" . intval($this->get_value('nonmandatory', 'draft')) . /* Default : Type : int(10) unsigned */ "',
'" . intval($this->get_value('nonmandatory', 'options_everyone')) . /* Default : Type : int(10) unsigned */ "',
'" . intval($this->get_value('nonmandatory', 'options_buddy')) . /* Default : Type : int(10) unsigned */ "',
'" . intval($this->get_value('nonmandatory', 'options_ignore')) . /* Default : Type : int(10) unsigned */ "',
'" . intval($this->get_value('nonmandatory', 'ratingnum')) . /* Default : Type : int(10) unsigned */ "',
'" . intval($this->get_value('nonmandatory', 'ratingtotal')) . /* Default : Type : int(10) unsigned */ "',
'" . floatval($this->get_value('nonmandatory', 'rating')) . /* Default : Type : float unsigned */ "',
'" . intval($this->get_value('nonmandatory', 'pending')) . /* Default : 0 Type : int(10) unsigned */ "',
'" . intval($this->get_value('nonmandatory', 'uncatposts')) . /* Default : 0 Type : int(10) unsigned */ "'
)
");
Code:
$Db_object->query("
INSERT INTO {$tableprefix}blog_user
(
bloguserid, importbloguserid, title, description, options,
viewoption, comments, lastblog, lastblogid,
lastblogtitle, lastcomment, lastcommenter, lastblogtextid,
allowsmilie, subscribeown, subscribeothers,
moderation, deleted, draft, options_everyone,
options_buddy, options_ignore, ratingnum, ratingtotal,
rating, pending
)
VALUES
(
'" . intval($this->get_value('mandatory', 'bloguserid')) . /* Default : 0 Type : int(10) unsigned */ "',
'" . intval($this->get_value('mandatory', 'importbloguserid')) . "',
'" . addslashes($this->get_value('nonmandatory', 'title')) . /* Default : Type : varchar(255) */ "',
'" . addslashes($this->get_value('nonmandatory', 'description')) . /* Default : Type : mediumtext */ "',
'" . intval($this->get_value('nonmandatory', 'options')) . /* Default : 0 Type : int(10) unsigned */ "',
'" . $this->enum_check($this->get_value('mandatory', 'viewoption'), array('all','only','except'), 'all') . /* Default : all Type : enum('all','only','except') */ "',
'" . intval($this->get_value('nonmandatory', 'comments')) . /* Default : 0 Type : int(10) unsigned */ "',
'" . intval($this->get_value('nonmandatory', 'lastblog')) . /* Default : 0 Type : int(10) unsigned */ "',
'" . intval($this->get_value('nonmandatory', 'lastblogid')) . /* Default : 0 Type : int(10) unsigned */ "',
'" . addslashes($this->get_value('nonmandatory', 'lastblogtitle')) . /* Default : Type : varchar(255) */ "',
'" . intval($this->get_value('nonmandatory', 'lastcomment')) . /* Default : 0 Type : int(10) unsigned */ "',
'" . addslashes($this->get_value('nonmandatory', 'lastcommenter')) . /* Default : Type : varchar(100) */ "',
'" . intval($this->get_value('nonmandatory', 'lastblogtextid')) . /* Default : 0 Type : int(10) unsigned */ "',
'" . intval($this->get_value('nonmandatory', 'allowsmilie')) . /* Default : Type : smallint(5) unsigned */ "',
'" . $this->enum_check($this->get_value('mandatory', 'subscribeown'), array('none','usercp','email'), 'none') . /* Default : none Type : enum('none','usercp','email') */ "',
'" . $this->enum_check($this->get_value('mandatory', 'subscribeothers'), array('none','usercp','email'), 'none') . /* Default : none Type : enum('none','usercp','email') */ "',
'" . intval($this->get_value('nonmandatory', 'moderation')) . /* Default : Type : int(10) unsigned */ "',
'" . intval($this->get_value('nonmandatory', 'deleted')) . /* Default : Type : int(10) unsigned */ "',
'" . intval($this->get_value('nonmandatory', 'draft')) . /* Default : Type : int(10) unsigned */ "',
'" . intval($this->get_value('nonmandatory', 'options_everyone')) . /* Default : Type : int(10) unsigned */ "',
'" . intval($this->get_value('nonmandatory', 'options_buddy')) . /* Default : Type : int(10) unsigned */ "',
'" . intval($this->get_value('nonmandatory', 'options_ignore')) . /* Default : Type : int(10) unsigned */ "',
'" . intval($this->get_value('nonmandatory', 'ratingnum')) . /* Default : Type : int(10) unsigned */ "',
'" . intval($this->get_value('nonmandatory', 'ratingtotal')) . /* Default : Type : int(10) unsigned */ "',
'" . floatval($this->get_value('nonmandatory', 'rating')) . /* Default : Type : float unsigned */ "',
'" . intval($this->get_value('nonmandatory', 'pending')) . /* Default : 0 Type : int(10) unsigned */ "'
)
");
P.S 2: Because of the 10000 character limit the remaining is on the first comment
Total Comments 13
Comments
-
The next error you will see will be on the table blog_category and it is the same with the above. In order to fix this find
and replace withCode:$Db_object->query(" INSERT INTO {$tableprefix}blog_category ( userid, title, description, childlist, parentlist, parentid, displayorder, postcount, importblogcategoryid ) VALUES ( '" . intval($this->get_value('mandatory', 'userid')) . /* Default : 0 Type : int(10) unsigned */ "', '" . addslashes($this->get_value('mandatory', 'title')) . /* Default : Type : varchar(255) */ "', '" . addslashes($this->get_value('nonmandatory', 'description')) . /* Default : Type : varchar(255) */ "', '" . addslashes($this->get_value('nonmandatory', 'childlist')) . /* Default : Type : mediumtext */ "', '" . addslashes($this->get_value('nonmandatory', 'parentlist')) . /* Default : Type : mediumtext */ "', '" . intval($this->get_value('nonmandatory', 'parentid')) . /* Default : Type : int(10) unsigned */ "', '" . intval($this->get_value('nonmandatory', 'displayorder')) . /* Default : Type : int(10) unsigned */ "', '" . intval($this->get_value('nonmandatory', 'postcount')) . /* Default : Type : int(10) unsigned */ "', '" . intval($this->get_value('mandatory', 'importblogcategoryid')) . /* Default : Type : int(10) unsigned */ "' ) ");
After all these fixes you can import vblogetin data if you really donot wish to associate users. Because if you try to associate users you will continue receiving more database errors and since i was really bored i decided to wait Jelsoft to fix this nightmare script.Code:$Db_object->query(" INSERT INTO {$tableprefix}blog_category ( userid, title, description, childlist, parentlist, parentid, displayorder, importblogcategoryid ) VALUES ( '" . intval($this->get_value('mandatory', 'userid')) . /* Default : 0 Type : int(10) unsigned */ "', '" . addslashes($this->get_value('mandatory', 'title')) . /* Default : Type : varchar(255) */ "', '" . addslashes($this->get_value('nonmandatory', 'description')) . /* Default : Type : varchar(255) */ "', '" . addslashes($this->get_value('nonmandatory', 'childlist')) . /* Default : Type : mediumtext */ "', '" . addslashes($this->get_value('nonmandatory', 'parentlist')) . /* Default : Type : mediumtext */ "', '" . intval($this->get_value('nonmandatory', 'parentid')) . /* Default : Type : int(10) unsigned */ "', '" . intval($this->get_value('nonmandatory', 'displayorder')) . /* Default : Type : int(10) unsigned */ "', '" . intval($this->get_value('mandatory', 'importblogcategoryid')) . /* Default : Type : int(10) unsigned */ "' ) ");Posted 09-03-2007 at 09:15 AM by Mert Gökçeimam
Updated 09-03-2007 at 01:00 PM by Mert Gökçeimam -
Posted 09-03-2007 at 04:15 PM by Michael Biddle
-
Bugs can get fixed, if users report them in the vBulletin bug tracker. Blogging about it doesn't really help. I've poked our developer Jerry to read this blog and review the suggestions. Sorry to hear the impex didn't go too well for you this time.Posted 09-03-2007 at 08:46 PM by Floris
-
Posted 09-03-2007 at 09:33 PM by TECK
-
Posted 09-03-2007 at 09:53 PM by Michael Biddle
-
Posted 09-03-2007 at 09:53 PM by Mert Gökçeimam
-
Floris , all these bugs have been reported 24 hours ago via support ticket. You can check them from ticket id : 701059 . Also this blog entry is mainly about a sunday night which i had to dedicate to impex.Quote:Originally Posted by FlorisBugs can get fixed, if users report them in the vBulletin bug tracker. Blogging about it doesn't really help. I've poked our developer Jerry to read this blog and review the suggestions. Sorry to hear the impex didn't go too well for you this time.Posted 09-03-2007 at 09:55 PM by Mert Gökçeimam
Updated 09-03-2007 at 09:58 PM by Mert Gökçeimam (mistypo) -
Posted 09-03-2007 at 10:46 PM by Martyn
-
Posted 09-03-2007 at 10:53 PM by Michael Biddle
-
Posted 09-04-2007 at 12:16 AM by Ace Shattock
-
Posted 09-09-2007 at 01:37 AM by Loco
-
Posted 09-10-2007 at 02:02 PM by Michael Biddle
-
tab
tab2
tab3 xP it's happening to me too, but they doesn't get parsed
on topic, man you had a bad sunday
Posted 10-03-2007 at 03:09 AM by Elmer
Total Trackbacks 0
