Skip to content
  • 0 Votes
    2 Posts
    2k Views
    Pramvir RatheeP

    Found the solution, importing too much topics in a single category hangs the nodebb, import some data than move it to some temporary category. Thasn import remaining data, meanwhile delete mongodb import Garbaze in using these mongo commands

    db.objects.update({},{$unset: {_imported_tid:1}},{multi: true}); db.objects.update({},{$unset: {_imported_uid:1}},{multi: true}); db.objects.update({},{$unset: {_imported_cid:1}},{multi: true}); db.objects.update({},{$unset: {_imported_slug:1}},{multi: true}); db.objects.update({},{$unset: {_imported_locked:1}},{multi: true}); db.objects.update({},{$unset: {_imported_path:1}},{multi: true}); db.objects.update({},{$unset: {_imported_title:1}},{multi: true}); db.objects.update({},{$unset: {_imported_content:1}},{multi: true}); db.objects.update({},{$unset: {_imported_guest:1}},{multi: true}); db.objects.update({},{$unset: {_imported_ip:1}},{multi: true}); db.objects.update({},{$unset: {_imported_user_slug:1}},{multi: true}); db.objects.update({},{$unset: {_imported_user_path:1}},{multi: true}); db.objects.update({},{$unset: {_imported_category_path:1}},{multi: true}); db.objects.update({},{$unset: {_imported_category_slug:1}},{multi: true});

    But keep in mind this will also delete the history of import will result in duplicate categories get imported or the posts, to prevent this keep writing post ids and category ids which you imported and delete them from the old database.

  • 0 Votes
    6 Posts
    3k Views
    BriB

    Yeah, so then you're probably on v.1.1.2 or close to it. You need to wipe your DB, and then start over, checking out v1.0.0: cd <your NodeBB directory> && rm -rf node_modules && git checkout v1.0.0 && ./nodebb install

  • 0 Votes
    1 Posts
    1k Views
    FidelixF

    First of all, I'm new to NodeJS development. I'm liking it so far (except for a few annoyances here and there).

    I am extending development of nodebb-plugin-import-ipboard (forked and will send a PR once it's done) to support a bunch of stuff the current plugin does not currently support, for instance:

    IPB replies which are in a special blockquote format. Spoiler blocks Mentions A few more things...

    On my nodebb-plugin-import-ipboard/index.js file, which I'm requiring from a manual test.js file (so it's not running inside NodeBB!), I placed a:
    var db = require('nodebb-plugin-import/server/db');

    But when I try to use it like this:
    var imported_post = db.getObject("_imported_post:1566");
    I just get "undefined".
    I can see on the debugger variables Redis is loaded (but I don't know if it was loaded correctly.)

    I also tried loading data instead of db:
    var data = require('nodebb-plugin-import/server/data');
    and
    var imported_post = data.getImportedPost("1566");

    And I just get undefined.
    Can someone tell me what I'm doing wrong?

  • 0 Votes
    1 Posts
    1k Views
    FidelixF

    First of all, I'm new to NodeJS development. I'm liking it so far (except for a few annoyances here and there).

    I am extending development of nodebb-plugin-import-ipboard (forked and will send a PR once it's done) to support a bunch of stuff the current plugin does not currently support, for instance:

    IPB replies which are in a special blockquote format. Spoiler blocks Mentions A few more things...

    On my nodebb-plugin-import-ipboard/index.js file, which I'm requiring from a manual test.js file (so it's not running inside NodeBB!), I placed a:
    var db = require('nodebb-plugin-import/server/db');

    But when I try to use it like this:
    var imported_post = db.getObject("_imported_post:1566");
    I just get "undefined".
    I can see on the debugger variables Redis is loaded (but I don't know if it was loaded correctly.)

    I also tried loading data instead of db:
    var data = require('nodebb-plugin-import/server/data');
    and
    var imported_post = data.getImportedPost("1566");

    And I just get undefined.
    Can someone tell me what I'm doing wrong?

  • nodebb importer

    Feature Requests
    10
    0 Votes
    10 Posts
    4k Views
    B

    I dont understand what you mean by 404 redirects? can you provide an example

  • 0 Votes
    8 Posts
    4k Views
    B

    @baris thanks!

    I don't like to brag 😛 but I kinda figured this out 16h ago

    I was checking uid==0 and skipping that out from deletion, but kept getting deleted. My admin uid kept incrementing for every node app --setup, so I looked at the schema again.

    but thanks your helper methods were extremely helpful.

  • 1 Votes
    10 Posts
    4k Views
    B

    @a_5mith good work mate, turns out the bug was originated in the ubb importer but never actually surfaced till I updated the importer plugin few weeks ago..

    Anyways:

    fix for admin's post not getting imported in this PR. https://github.com/a5mith/nodebb-plugin-import-smf/pull/1 also use the latest nodebb-plugin-import v0.1.4 to get more fancy bbcode support (details also mentioned in the PR thread) - the latest importer plugin also allows the topics and posts to be created even if there isn't a uid, however NodeBB 0.4.2 is throwing an error when creating topics with no uid, so you might need to wait till I update the importer's support to NodeBB 0.5.0 once it's released (discussion here) I will push more PRs tonight for the other exporters I know of (phpBB, vbexporter, ubb) to patch and reference them back here

    hope this helps