vBulletin 4, the most powerful community software + vBSEO 3.5, the ultimate SEO solution = Your ultimate platform for 2010 and beyond. Click below to learn more.

View RSS Feed

Mert Gökçeimam

Impex Nightmare

Rate this Entry
by on 09-03-2007 at 09:14 AM (3796 Views)
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
Code:
mpEx Database errormysql error: Invalid SQL: DESCRIBE blog_subscribepost importblogsubscribepostid
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
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:
As there is no posts fields inside blog_user table you need to correct the query at ImpExDatabase_blog_001.php file.
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 */ "'
)
");
Replace this with

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 : 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

Updated 09-03-2007 at 10:02 AM by Mert Gökçeimam

Tags: test
Categories
vBulletin

Comments

  1. Mert Gökçeimam -
    Mert Gökçeimam's Avatar
    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
    Code:
    $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 */ "'
    )
    ");
    
    and replace with

    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 */ "'
    )
    ");
    
    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.
    Updated 09-03-2007 at 01:00 PM by Mert Gökçeimam
    permalink
  2. Michael Biddle -
    Michael Biddle's Avatar
    lol

    Anyone notice when you hit TAB on the keyboard here, it doesnt go to the post bow button, instead it adds five (5) spaces?
    permalink
  3. Floris -
    Floris's Avatar
    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.
    permalink
  4. TECK -
    TECK's Avatar
    When I press TAB, it does go to the Post button (even if I use ALT + S usually).
    Tested in FF and IE7.
    permalink
  5. Michael Biddle -
    Michael Biddle's Avatar
    how wierd, im on FF and its doing it :(
    permalink
  6. Mert Gökçeimam -
    Mert Gökçeimam's Avatar
    Quote Originally Posted by TECK
    When I press TAB, it does go to the Post button (even if I use ALT + S usually).
    Tested in FF and IE7.
    Same with me and i can also add Safari to the tested browser
    permalink
  7. Mert Gökçeimam -
    Mert Gökçeimam's Avatar
    Quote Originally Posted by Floris
    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.
    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.
    Updated 09-03-2007 at 09:58 PM by Mert Gökçeimam (mistypo)
    permalink
  8. Martyn -
    Martyn's Avatar
    Agree'd when pressing tab in firefox, doesnt move to 'Post Now' just creates spaces.
    permalink
  9. Michael Biddle -
    Michael Biddle's Avatar
    Yeah!
    permalink
  10. Ace Shattock -
    Ace Shattock's Avatar
    Looks like someone fixed the TAB thing.. at least on the sucky IE5.5 I am forced to use at work..
    permalink
  11. Brandon Sheley -
    Brandon Sheley's Avatar
    I gave up on trying to import the vblogetin info
    permalink
  12. Michael Biddle -
    Michael Biddle's Avatar
    Well my tab still doesnt work :(
    permalink
  13. Elmer -
    Elmer's Avatar
    tab
    tab2
    tab3 xP it's happening to me too, but they doesn't get parsed

    on topic, man you had a bad sunday
    permalink

Trackbacks

Total Trackbacks 0
Trackback URL: