akhoury / nodebb-plugin-import

migrate your old crappy forum to NodeBB
MIT License
78 stars 31 forks source link

Error while exporting Xenforo v1.5.5 to nodeBB v1.12.1 #230

Closed unreal4u closed 5 years ago

unreal4u commented 5 years ago

Hi!

I have a pretty big old forum that I want to migrate from Xenforo v1.5.5 to nodeBB.

For this, I installed a new nodeBB v1.12.1, configured some basic stuff, disabled almost all plugins and went for a few test runs. However, I had some issues with the import:

[nodebb-plugin-import] importer.success [2019-08-19T20:58:39.223Z] Phase ::: categoriesImportStart

====QUERY====

SELECT count(*) FROM node

[nodebb-plugin-import-xenforo] { Error: ER_NO_SUCH_TABLE: Table 'XX.node' doesn't exist
    at Query.Sequence._packetToError (/home/XX/nodebb/node_modules/mysql/lib/protocol/sequences/Sequence.js:48:14)
    at Query.ErrorPacket (/home/XX/nodebb/node_modules/mysql/lib/protocol/sequences/Query.js:82:18)
    at Protocol._parsePacket (/home/XX/nodebb/node_modules/mysql/lib/protocol/Protocol.js:270:23)
    at Parser.write (/home/XX/nodebb/node_modules/mysql/lib/protocol/Parser.js:77:12)
    at Protocol.write (/home/XX/nodebb/node_modules/mysql/lib/protocol/Protocol.js:39:16)
    at Socket.<anonymous> (/home/XX/nodebb/node_modules/mysql/lib/Connection.js:82:28)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)
    at readableAddChunk (_stream_readable.js:250:11)
    at Socket.Readable.push (_stream_readable.js:208:10)
    at Pipe.onread (net.js:601:20)
(...)
  code: 'ER_NO_SUCH_TABLE',
  errno: 1146,
  sqlState: '42S02',
  index: 0 }
exporter.error [2019-08-19T20:58:39.245Z] Error: ER_NO_SUCH_TABLE: Table 'XX.node' doesn't exist

[nodebb-plugin-import] importer.success [2019-08-19T20:58:39.246Z] Importing undefined categories.

====QUERY====

SELECT node.node_id as _cid, node.title as _name, node.description as _description, node.parent_node_id as _parentCid, node.display_order as _order FROM node LIMIT 0,600000

[nodebb-plugin-import-xenforo] { Error: ER_NO_SUCH_TABLE: Table 'XX.node' doesn't exist
(...)

After this, the install script crashes.

So my main question is whether this plugin is compatible with this old Xenforo db? Maybe I should migrate it to another format first? It certainly does not have my preference but if it gets the job done, so be it.

What would be the best course of action to take?

Thanks for all your work on this plugin!

akhoury commented 5 years ago

whether this plugin is compatible with this old Xenforo db?

can you provide a database schema structure of your current database? or maybe obfuscate any sensitive columns you have and send me a database dump?

we would need to update this plugin to make it compatible with your database https://github.com/akhoury/nodebb-plugin-import-xenforo

unreal4u commented 5 years ago

Hi! I found the issue, while I was creating the schema structure I checked whether the node table was present... and it was but it was called xf_node. I added the prefix in the respective option and it began importing flawlessly :)

It is currently importing the users, all 60k of them so it will take a while lol but if any other issue arise I'll create a new ticket.

Thanks for making me double-check!

akhoury commented 5 years ago

Yes, sorry, importing users is slow, but i am working on a possible optimization for that. Let me know if you face any more issues

unreal4u commented 5 years ago

Hi, the import went ok, the big majority of posts, messages and users were imported (the only exceptions being from users which had invalid usernames [such as ... or ?????????] or emails [mostly with comma's in their email, such as hello,world@gmail.com or guest... yep, Xenforo allows you to have an email like that lol]).
This is not a big deal, we can (and should) fix this in Xenforo itself and it mostly affects users that have not logged in the last decade.

I now only have a problem with mongodb which doesn't want to run anymore lol

I have not diagnosed yet what could cause this, but the daemon crashed (at some point way after the import I enabled some plugins and restarted nodebb, when the forum wouldn't come up again I noticed that mongodb had crashed and it doesn't want to start up anymore).

Anyway, that has nothing to do with the import itself, I visited the newly imported site and at first glance everything was right where it's supposed to be.

Again: thank you so much for your work in this plugin! It is really simple to install and use! The only thing I would improve for my particular case is to add a small note right next to the table prefix option stating that the plugin does not set this option automatically based on the engine you chose.
I really did not care about the time it needed to do its work, I knew beforehand it was going to be a big operation, I'm simply glad because everything worked, which was the important thing.

akhoury commented 5 years ago

a small note right next to the table prefix option

noted.

akhoury commented 5 years ago

about the mongodb crash, share your logs at https://community.nodebb.org plenty of helpful folks there, I can take a look too.

unreal4u commented 5 years ago

Oh I did never post it back here, but mongodb crashing was another bug on my side, I'll have to admit that it was a kind of stupid one: I ran out of disk space. It totally corrupted the entire mongodb database and I ended up having to run the importer again. That did run flawlessly and now we have a working nodebb site :) We are performing the last tests and integrations so still not live but hey, getting there!

Thanks again for your work!

vagra commented 5 years ago

Great! I also have to migrate my xenforo forum to nodebb plans.