PDA

View Full Version : Miscellaneous Hacks - ImpEx Module: Xenforo


Andreas
05-17-2012, 10:00 PM
This is a Xenforo module for ImpEx, the vBulletin Import System,
it does allow you to import a Xenforo Database into a vBulletin 4 installation.

Currently, the following data will be imported:

Usergroups
Users including Avatars
Forums
Threads including Polls
Posts
Smilies
Attachments
Conversations
As vBulletin does not have an equivalent to the Conversations feature in Xenforo, conversations will be converted to Private Messages in vBulletin.
Please note that any attachments used in conversations will get lost as vBulletin does not (yet) support attachments in PMs.


This module has been developed for Xenforo 1.0.4, but it should also work with Xenforo 1.1.X.
Please not that Xenforo 1.1.X features (Profile Fields, Thread Prefixes, etc.) are not yet supported.

If there is enough interest I might add those features in a later release.

Warning
This module is BETA and has not been tested extensively - use it at your own risk.
If you find bugs, please report them!

Important - See Post #87 (https://vborg.vbsupport.ru/showthread.php?p=2512970#post2512970) about an important potential security issue and fix if you use this.

s.molinari
05-18-2012, 10:34 AM
Good job Andreas. Thanks for the help.

Scott

thecore762
05-18-2012, 11:17 AM
As always great work Andreas!

soniceffect
05-18-2012, 11:42 AM
Nooooooo .... spent hours and hours converting mine through IPB to get it back!!!!

Excellent work as always though m8. Im sure there are a fair few people who will greatly appreciate this effort

ENF
05-18-2012, 12:09 PM
Thanks Andreas, looking forward giving this a test run.

Brandon Sheley
05-18-2012, 12:44 PM
great release!!

I don't need it now but it's very nice to have the option if needed

Thanks for sharing :)

vidan
05-18-2012, 09:06 PM
thanks for sharing this, great work,
thought to porting my xf to vb, because xf now dead --;

8thos
05-19-2012, 08:58 AM
Nooooooo .... spent hours and hours converting mine through IPB to get it back!!!!

Excellent work as always though m8. Im sure there are a fair few people who will greatly appreciate this effort
LMFAO!!! I had thought about doing that at one point but changed my mind.

I'm just glad this is free.

TFGoRP
05-21-2012, 02:42 AM
I can't get attachments to import, source file not found.

Andreas
05-21-2012, 05:05 AM
What is the path you did enter for attachments?

TFGoRP
05-21-2012, 08:09 AM
What is the path you did enter for attachments?

I entered the path to the /data/attachments folder, attachments worked fine though.

However when I ran attachments it looked for filenames like "blah.jpg" but xenforo stores all its attachments as 466545646546545664 and other random numbers while the actual file names are in the database under the xf_attachment_data table.

Is there anything that could be done for attachments?

TFGoRP
05-21-2012, 12:02 PM
If you require any other information please do let me know!

eva2000
05-21-2012, 12:22 PM
Awesome indeed Andreas :D

Andreas
05-21-2012, 05:56 PM
I entered the path to the /data/attachments folder, attachments worked fine though.

Thats's the wrong path, this directory only contains thumbnails.
You must enter the part to internal_data/attachments.


However when I ran attachments it looked for filenames like "blah.jpg"

The filename is just for human readability, it does look for the real file (well, at least it should :)).

TFGoRP
05-21-2012, 10:57 PM
Thats's the wrong path, this directory only contains thumbnails.
You must enter the part to internal_data/attachments.


The filename is just for human readability, it does look for the real file (well, at least it should :)).

the path to internal_data/attachments does not work, it still tells me source file not found for every single attachment.

If you need any other info do let me know! I would very much like to be able to do the full import as soon as possible, thank you for the support and time you have put into this :)

Look forward to your next response.

Andreas
05-22-2012, 04:39 AM
Seems like you are SOL with this problem then as it works just fine for me.

Sorry, but I can't help you without access to your server.

You might want to check that the path is indeed correct and that the webserver has read access to read the files:
Put

echo($path);

in line 94 of 010.php to see which files are actually being accessed.

BamaStangGuy
05-22-2012, 04:49 AM
Nooooooo .... spent hours and hours converting mine through IPB to get it back!!!!

I'd have just stopped at IPB...

Maybe one day vBulletin will come up with a 3.6.12 to 4.2 upgrade script for vBulletin.org ;)

TFGoRP
05-22-2012, 09:53 AM
Seems like you are SOL with this problem then as it works just fine for me.

Sorry, but I can't help you without access to your server.

You might want to check that the path is indeed correct and that the webserver has read access to read the files:
Put

echo($path);

in line 94 of 010.php to see which files are actually being accessed.

I managed to get the attachments imported but on the very last step after importing attachments which worked perfectly I get this error on the last button. Process Inline attachments

ImpEx Database error

mysql error: Invalid SQL:
SELECT attachmentid
FROM attachment
WHERE importattachmentid != 0
ORDER BY attachmentid ASC
LIMIT , 10


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 ' 10' at line 5

mysql error number: 1064

Date: Tuesday 22nd 2012f May 2012 05:52:31 AM
Database: mydatabase
MySQL error:+
Anyway to fix that?

Thanks for your support!

TFGoRP
05-22-2012, 10:11 AM
Quick update: I can't even click on the Import button in the ACP, I also get the error above.

pjfry
05-22-2012, 10:12 AM
Hi i get this Error after importing the forums:


ImpEx Database error

mysql error: Invalid SQL:
UPDATE forum
SET parentid = 2218
WHERE forumid = 2088


mysql error: Table 'dev_onlinegilde.forum' doesn't exist

mysql error number: 1146

Date: Tuesday 22nd 2012f May 2012 01:09:11 PM
Database: dev_onlinegilde
MySQL error:



First i thought this is a problem with my target DB, but the connection seems to be fine. So I have no idea what is going wrong here.

Maybe someone has an idea?

Thanks for your help!

Benny

Andreas
05-22-2012, 11:01 AM
@TFGoRP
Sorry, but as said before - I can't help you without access to your server.

First i thought this is a problem with my target DB, but the connection seems to be fine. So I have no idea what is going wrong here.

Maybe someone has an idea?
Line 510 of 000.php should be

UPDATE {$Target_tableprefix}forum


instead of

UPDATE {$tableprefix}forum

pjfry
05-22-2012, 11:02 AM
Thanks for your help! I will try it as soon as I get home from work :)

Benny

eyedream
05-23-2012, 10:02 AM
please any one guide me how to use this please ...

joyboy2001
05-23-2012, 11:41 AM
ImpEx must bring in tons of customers for vBulletin ... Great work guys :)

ragtek
05-23-2012, 01:29 PM
IMO all the {$tableprefix} are unnecessary, because xf doesn't have a table prefix:)

eyedream
05-23-2012, 05:37 PM
i have just convert XenForo 1.1.2 TO vBulletin 4.1.12 all works fine but passwords issue...:(

Andreas
05-24-2012, 03:48 PM
IMO all the {$tableprefix} are unnecessary, because xf doesn't have a table prefix:)
Hmm ... at least my sample database does have one (xf_).

i have just convert XenForo 1.1.2 TO vBulletin 4.1.12 all works fine but passwords issue...
It is not possible to just import XenForo passwords into vBulletin as XenForo password hashes are incompatible with vBulletin, you would have to create an Addon to handle authentication differently than vBulletin does by default.

Although this would be possible, it requires quite a bit of work.

ragtek
05-24-2012, 05:10 PM
Hmm ... at least my sample database does have one (xf_).


That's the standard prefix which is hardcoded in the entire code and used for all standard xf tables

http://xenforo.com/community/threads/xf_-table-prefix.19408/
http://xenforo.com/community/threads/add-a-table-prefix-to-xenforo.31837/

Andreas
05-24-2012, 09:29 PM
Hardoced or User-Defined doesn't really matter, after all it is a prefix :)

iBaker
05-25-2012, 12:08 AM
Thank you so much Andreas...this was one of the biggest things stopping me from bringing my main site back to vb...when I am finished setting up my new vb version of the site I will give this a try.

Thanks again

eyedream
05-25-2012, 05:33 AM
Hmm ... at least my sample database does have one (xf_).


It is not possible to just import XenForo passwords into vBulletin as XenForo password hashes are incompatible with vBulletin, you would have to create an Addon to handle authentication differently than vBulletin does by default.

Although this would be possible, it requires quite a bit of work.

please guide me how to create addon please.
Regards

TheInsaneManiac
05-27-2012, 05:48 AM
So I can import all my users but the can't login is that what I am hearing?

Andreas
05-27-2012, 05:50 AM
Not without resetting their password, yes.

Andreas
05-27-2012, 05:51 AM
please guide me how to create addon please.
Regards
Take a look at how login.php, functions_login.php do work, extend the database to store XenForo Login credentials and program the required Plug-ins.

TheInsaneManiac
05-27-2012, 06:04 AM
You know if IPB converts to their passwords and Impex will convert IPB passwords?

Andreas
05-27-2012, 07:41 AM
AFAIK current IPB versions don't use a hashing scheme that is compatible with vBulletin, eg. if you import IPB accounts you would most likely have ot reset passwords as well.

TheInsaneManiac
05-27-2012, 08:11 AM
Anyway to make it accept current xf password and force them to change the password?

SocialNetworkBuzz
05-27-2012, 09:06 AM
hehe it's like ping pong, everyone wants to convert now as things been quiet on the xF front and vB 4.2 just came out.. Next when xF 1.2 comes out, everyone will want convert again til vB 5.x.. etc

TheInsaneManiac
05-27-2012, 10:20 AM
I actually converted to code in both worlds, but when my vBulletin database crashed (probably XenForo doing...) I was resorted to keeping the converted XenForo. I've never liked it, but have found myself making more of a profit on XF than vB, but loosing my SEO has dropped my members and guests by half, so the money I have earned making mods on XF, I have lost by advertising revenue decrease. So... Money wise it's about equal, but from day one about 6 months ago, I wanted to switch back. Note to self... Never install and convert a database table... On the same database.

Ohhh, and no, it won't be ping pong, I will be selling my XenForo license after this mess is cleared up. Coding on their platform is more complicated, auto template editing is not even possible yet, which really aggravates me and other customers.

JammerOne
06-02-2012, 09:06 AM
Hello there ...

I am very new here ..

my old board is xenforo and I like to transfer in VB4.20 but my problem is how to get the data from my old one ..

anyone can help me ..

Regards,

BirdOPrey5
06-02-2012, 09:48 AM
Here is the manual on using Impex, the import tool:
https://www.vbulletin.com/docs/html/impex

TheInsaneManiac
06-03-2012, 08:03 AM
Anyway to make it accept current xf password and force them to change the password?

Bump. I mean if XenForo can convert passwords to their own format why can't vB convert back?

Andreas
06-03-2012, 08:42 AM
Bump. I mean if XenForo can convert passwords to their own format why can't vB convert back?
XF doesn't convert passwords, it simply has code to support other authentication systems besides its own as well - vBulletin and IPB.
vBulletin does not have such a system, it only understands its own format :)

If you want it to support other authentcation systems you have to do that on your own.

TheInsaneManiac
06-03-2012, 09:29 AM
So XF doesnt convert it just uses existing and recognizes if it is a vB password?

Andreas
06-03-2012, 09:51 AM
Exactly.

TheInsaneManiac
06-03-2012, 07:56 PM
How hard is that to do? Think if you get a lil spare time you can accomplish this? I'm no expert like you are.

Andreas
06-03-2012, 08:54 PM
Not much, all necessary hooks are there.

I don't have spare time, and even if I hand I most likely wouldn't do it as it's a rather boring task and I don't think there would be much interest..

Sorry :(

TheInsaneManiac
06-04-2012, 12:26 AM
Not much, all necessary hooks are there.

I don't have spare time, and even if I hand I most likely wouldn't do it as it's a rather boring task and I don't think there would be much interest..

Sorry :(

I could send some money your way. I do a boring job too, so I understand, how long would it take you and how much would you charge?

iBaker
06-04-2012, 08:33 AM
Passwords is, and always will be, the major stumbling block with this Andreas...hats off to you if you can work a solution into the pack

pjfry
06-08-2012, 08:27 PM
Hi do anybody have a redirect script or code to redirect the old xenforo links (forums, threads, ...) to the new vbulletin ones?

Is this possible? Thanks!

Benny

iBaker
06-13-2012, 07:30 AM
I am just about to run a test instance however the first thing that is displayed in impex before I even start importing is:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at [path]/impex/ImpExFunction.php:522) in [path]/includes/facebook/facebook.php on line 37

iBaker
06-13-2012, 09:27 AM
I have finished a test run...very test only run to see what problems come up.

1. Firstly there is the error message across the top of the impex page that I posted about just above
2. As far as tables go, it reported 2 tables not found:
xf_identity_service NOT found.
xf_user_identity NOT found.
3. The Attachments path I just could not get right. I tried echoing the path and it showed the correct web address for the internal_data/attachments of the source web site but it failed on all attachments. I copied the source attachments folder to a folder in the target domain (i.e. vb site) and used the path /home/xxx/public_html/source_att/attachments/ and that worked for about 500 attachments out of 14,500

NOTES:
I am using XF v1.1.2 and vb v4.2 PL1
I run a dedicated server using WHM/cPanel and both domains (source and target) are on the same server
My XF site has 7,000 users, 25,000 Threads and 180,000 Posts

Andreas, if you want to test it all with access to the source and target domains let me know

big dan
07-05-2012, 06:34 PM
Thanks for the great addon Andreas!

I'm seeing a problem running the import forums module.

The last forum errors out with

ImpEx Database error

mysql error: Invalid SQL:
UPDATE forum
SET parentid = 366
WHERE forumid = 369


mysql error: Table 'xxxxx_vbulldev.forum' doesn't exist

mysql error number: 1146

Date: Thursday 05th 2012f July 2012 03:31:07 PM
Database: xxxxxx_vbulldev
MySQL error:

Sadikb
07-24-2012, 09:17 PM
If importing in a new VB instance, does this retain the same IDs (thread_id, forum_id etc) as the ones used in XF or not?

ragtek
07-27-2012, 06:54 PM
"bug" in 000.php


function parent_id_update($Source_Db_object, $Target_Db_object, $Source_tableprefix, $Target_tableprefix)
{
// mapping table: importforumid => forumid
$importforums = array();

$forums = $Target_Db_object->query("
SELECT forumid, importforumid, importcategoryid
FROM {$Target_tableprefix}forum
WHERE importforumid != 0 OR importcategoryid != 0
");
while ($forum = $Target_Db_object->fetch_array($forums))
{
if ($forum['importcategoryid'] > 0)
{
$importforums[$forum['importcategoryid']] = $forum['forumid'];
}
else
{
$importforums[$forum['importforumid']] = $forum['forumid'];
}

$forumcache[$forum['forumid']] = $forum;
}

// mapping table: nodeid -> parentnodeid
$parentnodes = array();

$nodes = $Source_Db_object->query("
SELECT node_id, parent_node_id
FROM {$Source_tableprefix}node
");
while ($node = $Source_Db_object->fetch_array($nodes))
{
$parentnodes[$node['node_id']] = $node['parent_node_id'];
}

foreach ($forumcache AS $forumid => $forum)
{
if ($forum['importcategoryid'] > 0)
{
$importid = $forum['importcategoryid'];
}
else
{
$importid = $forum['importforumid'];
}

if (isset($parentnodes[$importid]) AND isset($importforums[$parentnodes[$importid]]))
{
$Target_Db_object->query("
UPDATE {$tableprefix}forum
SET parentid = " . $importforums[$parentnodes[$importid]] . "
WHERE forumid = $forumid
");
}
}
}

should be

function parent_id_update($Source_Db_object, $Target_Db_object, $Source_tableprefix, $Target_tableprefix)
{
// mapping table: importforumid => forumid
$importforums = array();

$forums = $Target_Db_object->query("
SELECT forumid, importforumid, importcategoryid
FROM {$Target_tableprefix}forum
WHERE importforumid != 0 OR importcategoryid != 0
");
while ($forum = $Target_Db_object->fetch_array($forums))
{
if ($forum['importcategoryid'] > 0)
{
$importforums[$forum['importcategoryid']] = $forum['forumid'];
}
else
{
$importforums[$forum['importforumid']] = $forum['forumid'];
}

$forumcache[$forum['forumid']] = $forum;
}

// mapping table: nodeid -> parentnodeid
$parentnodes = array();

$nodes = $Source_Db_object->query("
SELECT node_id, parent_node_id
FROM {$Source_tableprefix}node
");
while ($node = $Source_Db_object->fetch_array($nodes))
{
$parentnodes[$node['node_id']] = $node['parent_node_id'];
}

foreach ($forumcache AS $forumid => $forum)
{
if ($forum['importcategoryid'] > 0)
{
$importid = $forum['importcategoryid'];
}
else
{
$importid = $forum['importforumid'];
}

if (isset($parentnodes[$importid]) AND isset($importforums[$parentnodes[$importid]]))
{
$Target_Db_object->query("
UPDATE {$Target_tableprefix}forum
SET parentid = " . $importforums[$parentnodes[$importid]] . "
WHERE forumid = $forumid
");
}
}
}

the last prefix is wrong

Paul M
07-27-2012, 09:04 PM
I cannot see any difference between the two bits of code, you probably want to make it more obvious.

big dan
07-27-2012, 09:11 PM
Thanks Ragtek! That fixed my forums import issue. :up:

ragtek
07-28-2012, 06:52 AM
I cannot see any difference between the two bits of code, you probably want to make it more obvious.

the last prefix is wrong


if (isset($parentnodes[$importid]) AND isset($importforums[$parentnodes[$importid]]))
{
$Target_Db_object->query("
UPDATE {$tableprefix}forum
SET parentid = " . $importforums[$parentnodes[$importid]] . "
WHERE forumid = $forumid
");
}

vs


if (isset($parentnodes[$importid]) AND isset($importforums[$parentnodes[$importid]]))
{
$Target_Db_object->query("
UPDATE {$Target_tableprefix}forum
SET parentid = " . $importforums[$parentnodes[$importid]] . "
WHERE forumid = $forumid
");
}

merk_aus
08-01-2012, 12:04 AM
So what is the best way to get passwords to work?

big dan
08-10-2012, 01:03 AM
So what is the best way to get passwords to work?

After importing email your members with the password reset link. That's what I did. It wasn't too bad.

Brandon Sheley
08-25-2012, 02:25 AM
3. The Attachments path I just could not get right. I tried echoing the path and it showed the correct web address for the internal_data/attachments of the source web site but it failed on all attachments. I copied the source attachments folder to a folder in the target domain (i.e. vb site) and used the path /home/xxx/public_html/source_att/attachments/ and that worked for about 500 attachments out of 14,500



Ouch...
What did you do about the attachments, where you just testing things out?

iBaker
08-25-2012, 02:39 AM
Yes I was just testing things out and couldn't get them imported so had to give up...very funny that you have just posted as about 2hrs ago I reinstalled vb and are going to make a concentrated effort to try and get things right so if anyone can help with the attachments then please, let us know what you did...also the other biggest worry is passwords, I will pay to be able for my users to keep their passwords

RedFlamePro
08-27-2012, 02:20 PM
who can convert this mod to vbb 3.8x , please

iBaker
09-02-2012, 12:54 AM
Ok, I have been working on this a fair bit and are overcoming many of the problems that it has, both within Impex and this mod.

I have been doing this on my local PC using xampps and once it is all going properly will try on a web server and then if all goes well I will post here the little things that I have had to do to make it work...for example Attachments should use database not file system as that will cause an error etc.

The final error that I have come up with is in the very last process of changing the in-line attachments (step 11).

The error I get is:
ImpEx Database error

mysql error: Invalid SQL:
SELECT attachmentid
FROM attachment
WHERE importattachmentid != 0
ORDER BY attachmentid ASC
LIMIT , 1000


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 ' 1000' at line 5

mysql error number: 1064

Date: Saturday 01st 2012f September 2012 12:24:14 PM
Database: recflynew_forum
MySQL error:

This is the code in the php file that causes the error (011.php):
// Get an array data
$attachments = $Db_target->query("
SELECT attachmentid
FROM {$t_tb_prefix}attachment
WHERE importattachmentid != 0
ORDER BY attachmentid ASC
LIMIT $start_at, $per_page
");

MySQL Error 1064 seems to fire up if the delimiter is incorrect...it also interesting that there seems to be no value inserted for $start_at

Can anyone help with this final error...thanks!

iBaker
09-03-2012, 07:26 AM
I give up on this...after 2 days of solid work I can't get it to work...maybe some of you can that only have very small sites but for example if you have any more than 1,000 attachments it will fail...you don't get passwords or even the videos that XF allows you in posts and more.

The only option for me now, and others that are not happy with XF is to go to IPB...a real pity for vb

big dan
09-03-2012, 04:35 PM
Ian,

For what it's worth I imported 400,000+ posts with something like 20k attachments with this module. The only thing I had to change was Ragtek's edit here: https://vborg.vbsupport.ru/showpost.php?p=2351944&postcount=55

Inline attachments stalled for me with no error given so I skipped it. It isn't a major step it just places the attachment code in posts.

iBaker
09-03-2012, 11:11 PM
Ian,

For what it's worth I imported 400,000+ posts with something like 20k attachments with this module. The only thing I had to change was Ragtek's edit here: https://vborg.vbsupport.ru/showpost.php?p=2351944&postcount=55

Inline attachments stalled for me with no error given so I skipped it. It isn't a major step it just places the attachment code in posts.
So are you saying that any post that has an inline attachment will still show the attach code in the post and no image but the attached image will show as a standard attachment?

This would result in messy posts wouldn't it?

Also what did you do about Avatars as my attempts show the user's avatar ok when viewing the user in the ACP however their avatar doesn't display in any postbits?

Also XF has the ability to display YouTube, Vimeo etc videos inline in posts. How did you handle their display instead of just leaving the bbcode text of them again making posts look messy?

Also what process do you do after step 10 given that you didn't run step 11?

iBaker
09-04-2012, 04:14 AM
Just completed another import in my test xampp environment on my PC and are resolving 3many of the little issues...eg, Avatars are now working etc.

A couple of big issues that I have found is that the importer doesn't seem to do is:
Poll information...it only imports the first option of a poll and not all the other options so all polls just have one entry
Profile Messages don't seem to import either
IP addresses of posts don't get imported

big dan
09-06-2012, 04:42 PM
Just completed another import in my test xampp environment on my PC and are resolving 3many of the little issues...eg, Avatars are now working etc.

A couple of big issues that I have found is that the importer doesn't seem to do is:
Poll information...it only imports the first option of a poll and not all the other options so all polls just have one entry
Profile Messages don't seem to import either
IP addresses of posts don't get imported

I noticed the lack of IP address and Profile messages after the import. Visitor messages are rarely used on my board and the IP address I can live without.

So are you saying that any post that has an inline attachment will still show the attach code in the post and no image but the attached image will show as a standard attachment?

This would result in messy posts wouldn't it?

Also what did you do about Avatars as my attempts show the user's avatar ok when viewing the user in the ACP however their avatar doesn't display in any postbits?

Also XF has the ability to display YouTube, Vimeo etc videos inline in posts. How did you handle their display instead of just leaving the bbcode text of them again making posts look messy?

Also what process do you do after step 10 given that you didn't run step 11?

Yeah, I left the posts messy. I'll edit them as they come up but I'm not very worried about it.

After step 10 I clicked the database cleanup and restart link to delete the session then dumped the IMPEX files and ran all the counter updates.

Alien
09-07-2012, 04:41 PM
I hope to see this updated for profile messages and thread prefixes.

Thanks, Andreas!

daveaite
09-08-2012, 01:00 AM
Surprized you guys made an impex when vbulletin is in a lawsuit with xenforo?

toibs
09-18-2012, 10:46 PM
I'm not - makes perfect sense when xF announce last week that development has stopped...

Therefore I make a request of Andreas - PLEASE could you add as much as possible to import from Xenforo - i expect there will be a lot of interest....

Thx

iBaker
11-04-2012, 12:10 AM
Your gonna start that conversation within a mod topic? Seriously?
Thanks for confirming the attitude

iBaker
11-04-2012, 12:15 AM
Looks like this mod has stalled like Xenforo has...all that is left is vb5 or IPB...need I say any more YUK!!!!!!!!

How to destroy a complete industry in one big foul swoop

soniceffect
11-04-2012, 12:56 AM
Looks like this mod has stalled like Xenforo has...all that is left is vb5 or IPB...need I say any more YUK!!!!!!!!

How to destroy a complete industry in one big foul swoop

Your gonna start that conversation within a mod topic? Seriously?

mattpist
11-20-2012, 06:17 AM
Ok, I have been working on this a fair bit and are overcoming many of the problems that it has, both within Impex and this mod.

I have been doing this on my local PC using xampps and once it is all going properly will try on a web server and then if all goes well I will post here the little things that I have had to do to make it work...for example Attachments should use database not file system as that will cause an error etc.

The final error that I have come up with is in the very last process of changing the in-line attachments (step 11).

The error I get is:
ImpEx Database error

mysql error: Invalid SQL:
SELECT attachmentid
FROM attachment
WHERE importattachmentid != 0
ORDER BY attachmentid ASC
LIMIT , 1000


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 ' 1000' at line 5

mysql error number: 1064

Date: Saturday 01st 2012f September 2012 12:24:14 PM
Database: recflynew_forum
MySQL error:

This is the code in the php file that causes the error (011.php):
// Get an array data
$attachments = $Db_target->query("
SELECT attachmentid
FROM {$t_tb_prefix}attachment
WHERE importattachmentid != 0
ORDER BY attachmentid ASC
LIMIT $start_at, $per_page
");

MySQL Error 1064 seems to fire up if the delimiter is incorrect...it also interesting that there seems to be no value inserted for $start_at

Can anyone help with this final error...thanks!

I'm having this same exact issue. it looks like changing the code "LIMIT $start_at, $per_page" but i don't know enough to know what to fix.

vB-Tr
01-12-2013, 02:39 AM
Hi. l move the my friend's forum.

xenforo=>vbulletin

but l login with only username. l dont write a password but l login site.

I've tried all the username!!

How do I fix this error?

xenforo version => 1.1.2

vB-Tr
01-12-2013, 05:41 PM
who can help me?

vB-Tr
01-12-2013, 10:04 PM
l solved this problem.


UPDATE user set password = MD5(concat(MD5('vb-tr'), user.salt)) WHERE usergroupid = 2


and all password is => vb-tr :) and don't login only username :)

fabiocesar
01-31-2013, 04:58 PM
Ok, I have been working on this a fair bit and are overcoming many of the problems that it has, both within Impex and this mod.

I have been doing this on my local PC using xampps and once it is all going properly will try on a web server and then if all goes well I will post here the little things that I have had to do to make it work...for example Attachments should use database not file system as that will cause an error etc.

The final error that I have come up with is in the very last process of changing the in-line attachments (step 11).

The error I get is:
ImpEx Database error

mysql error: Invalid SQL:
SELECT attachmentid
FROM attachment
WHERE importattachmentid != 0
ORDER BY attachmentid ASC
LIMIT , 1000


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 ' 1000' at line 5

mysql error number: 1064

Date: Saturday 01st 2012f September 2012 12:24:14 PM
Database: recflynew_forum
MySQL error:

This is the code in the php file that causes the error (011.php):
// Get an array data
$attachments = $Db_target->query("
SELECT attachmentid
FROM {$t_tb_prefix}attachment
WHERE importattachmentid != 0
ORDER BY attachmentid ASC
LIMIT $start_at, $per_page
");

MySQL Error 1064 seems to fire up if the delimiter is incorrect...it also interesting that there seems to be no value inserted for $start_at

Can anyone help with this final error...thanks!

still no solution for this bug??

fabiocesar
09-13-2013, 01:22 PM
an update with support xenforo 1.2?

Booth
10-18-2013, 07:30 AM
Does this work with Xenforo 1.2?

Booth
10-21-2013, 11:17 AM
This actually worked better than the IPB importer. Didn't bring in private messages though!

CILGINKRAL_
08-27-2014, 11:48 AM
ImpEx Database error

mysql error: Invalid SQL: CREATE TABLE impexerror (
errorid bigint(20) unsigned NOT NULL auto_increment,
errortype varchar(10) NOT NULL default '',
classnumber varchar(3) NOT NULL default '',
importid bigint(20) NOT NULL default 0,
error varchar(250) default 'NULL',
remedy varchar(250) default 'NULL',
PRIMARY KEY (errorid)
) TYPE=MyISAM

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 'TYPE=MyISAM' at line 9

mysql error number: 1064

Date: Wednesday 27th 2014f August 2014 12:40:09 PM
Database: data_vbtest
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 'TYPE=MyISAM' at line 9


I'm getting this error. :(

ozzy47
08-27-2014, 02:47 PM
Edit the XML and change, TYPE=MyISAM; to ENGINE=MyISAM;

CILGINKRAL_
08-27-2014, 07:11 PM
Which file xml?

ok
impex/index.php ;)

Thanks ozzy47

z3r0
08-28-2014, 12:08 PM
I can't see this mentioned above so I think it's best to post - I used this a few days ago and it allowed people to log in with a blank password after the conversion, to address this I used pwdreset.php from this page (https://vborg.vbsupport.ru/showthread.php?t=61915&page=2) to reset and email new passwords to all users.

New Joe
08-28-2014, 12:30 PM
I can't see this mentioned above so I think it's best to post - I used this a few days ago and it allowed people to log in with a blank password after the conversion, to address this I used pwdreset.php from this page (https://vborg.vbsupport.ru/showthread.php?t=61915&page=2) to reset and email new passwords to all users.

Kind of a security issue really, for Admin accounts too.
I would suggest reporting this with the report button.

denpietrau
09-10-2014, 09:23 AM
I entered the path to the /data/attachments folder, attachments worked fine though.

However when I ran attachments it looked for filenames like "blah.jpg" but xenforo stores all its attachments as 466545646546545664 and other random numbers while the actual file names are in the database under the xf_attachment_data table.

Is there anything that could be done for attachments?
Hi TFGoRP!

1. Copy Folder Attachments (internal_data/attachments from xenforo) to Vbulletin.
2. Path: /home1/myaccount/public_html/forum/internal_data/attachments

Phillip
02-28-2015, 03:57 PM
Alright, I know this is for 4.1, but will it still work with 3.8 I get as far as the thread import and it ends up being...

ImpEx cannot continue and has halted due to missing needed fields in the source database :

xf_poll.multiple

Repair the source database and restart the import.

What do I need to do with this?

Zachery
02-28-2015, 05:25 PM
I'm guessing the xfschema has changed recently.

Phillip
02-28-2015, 05:29 PM
I'm guessing the xfschema has changed recently.

Yeah, I had to add the a multiple field in the xf_poll table, but still getting to the attachments of it messes up as well after fixing the error in that part.

Jinze
05-25-2015, 03:35 PM
Hello, how to do a 301 redirect from old xenforo URL to Vbulletin 4 URL please ?

Thank you

zapiy
08-11-2015, 04:14 PM
Alright, I know this is for 4.1, but will it still work with 3.8 I get as far as the thread import and it ends up being...



What do I need to do with this?

How did you fix this fella.

I am stuck on this part now.

BirdOPrey5
08-11-2015, 05:19 PM
Try manually adding the multiple field to the database as explained in post #92.

zapiy
08-13-2015, 10:58 AM
How do I do that?

BirdOPrey5
08-14-2015, 08:41 AM
If you use a tool like phpmyadmin to access the database you browse to the xf_poll table, and then add the field using the on screen controls. The field name is multiple. I would guess it's a tinyint field but that should really matter as long as it exists.

But I would add a tinyint field with a default value of 0 (zero.)

That should get through this one issue, but there will likely be more.

e24h
08-14-2015, 08:52 AM
I'm guessing the xfschema has changed recently.

Zachery
08-14-2015, 09:56 AM
There are a few changes that need to be fixed, I've got them sitting on my harddrive, its not a 100% solution, but without andreas' permission, I cannot release it :(

zapiy
08-16-2015, 06:00 AM
Ok thanks all, i managed to get it all imported but there are many issues since the import..

Most i am hoping you can all help with..

PM's appear to all be defaulted like this

https://vborg.vbsupport.ru/external/2015/08/10.jpg

Is there a quick way to default everyone back?

BirdOPrey5
08-16-2015, 07:55 AM
To be honest, considering how different XF PCs are from VB PMs, do you really need them? I would considerer erasing them all.

zapiy
08-17-2015, 06:38 AM
How can i do that? Is there an easy way

BirdOPrey5
08-17-2015, 12:27 PM
Safest way is to use something like this- https://vborg.vbsupport.ru/showthread.php?t=234466

steviewonder44
01-07-2016, 04:24 PM
this still works with vbimpex from the git

sternenfee
07-11-2016, 06:08 AM
Hello,
thank you for this importer - it`s exactly what i looking for... Works good - but while importing forums ther was a error message:
ImpEx Database error

mysql error: Invalid SQL:
UPDATE forum
SET parentid = 30
WHERE forumid = 438


mysql error: Table 'd016aa4d.forum' doesn't exist

mysql error number: 1146

Date: Monday 11th 2016f July 2016 10:03:48 AM
Database: d016aa4d
MySQL error:

Can you help me please?

msibm
10-26-2016, 04:59 PM
Can it work for xf 1.4? Thanks!

Brad Padgett
02-27-2017, 11:18 AM
Does this still work? Let me know as I am very interested. Thanks.

ahmed85
09-05-2020, 03:03 PM
Can I use this mod to convert XF2 to VB5 ?

Greek76
10-07-2020, 09:08 PM
How do you use this? I downloaded it and uploaded to my forum directory but now what? I have no clue lol. Help?

bo7abeba
09-12-2023, 02:24 PM
What is the broad composition that was not mentioned in the participation?

Where do I put the files?