akhoury/nodebb-plugin-import

Not importing posts

Closed this issue · 3 comments

Hello,

I am having an issue while trying to import a phpbb 3.1 forum.

The import works fine for users and topics, but it does not import posts. All topics are empty.

Has anybody had this issue ? Any idea what could be happening ?

Any help will be appreciated.

possibly related to #205

Thank you. I ended up fixing it by making some minor changes.

For anyone with the same issue:

There are some changes that need to be done for a successful import of topics, users and posts from phpbb 3.1.

1.- Complete the import form normally and execute it. It will fail. I did this in just so that the module nodebb-plugin-import-phpbb gets installed (you can install it manually instead).
2.- Go to /your/nodebb/install/node_modules/nodebb-plugin-import-phpbb and edit the index.js file.
Change the line that says this:

+ prefix + 'topics.topic_approved as _approved, '

to this:

+ prefix + 'topics.topic_posts_approved as _approved, '

Also, comment this line:

+ prefix + 'posts.post_approved as _approved '

And remove the comma at the previous line:

+ prefix + 'posts.poster_id as _uid '

3.- Go again to the import configuration page, and complete the form. Select "Skip Module Install" (so it doesn't overwrite the changes made), and begin the import.

Please note that if the database is big, it will take a long time. There will be moments when you think that it is stuck, but it will complete (took almost 10 hours to import my database).

Hope this helps somebody.