• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

Import from SMF failing with "callFn.apply is not a function error"

Scheduled Pinned Locked Moved Technical Support
8 Posts 3 Posters 847 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    signal15
    wrote on last edited by
    #1

    It imports the users just fine. But, it looks like it's failing when importing messages:

    ...
    [nodebb-plugin-import] importer.success [2018-07-20T03:24:23.135Z] Importing 2934 messages.
    [nodebb-plugin-import-smf] getPaginatedMessages
    exporter.log [2018-07-20T03:24:23.137Z] getPaginatedMessages
    2018-07-20T03:24:23.392Z [25675] - error: message=callFn.apply is not a function, stack=TypeError: callFn.apply is not a function
    at /home/ubuntu/nodebb/node_modules/async/dist/async.js:473:16
    at next (/home/ubuntu/nodebb/node_modules/async/dist/async.js:5329:29)
    at /home/ubuntu/nodebb/node_modules/async/dist/async.js:969:16
    at Object.Messaging.checkContent (/home/ubuntu/nodebb/src/messaging/create.js:31:11)
    at /home/ubuntu/nodebb/src/messaging/create.js:49:15
    at nextTask (/home/ubuntu/nodebb/node_modules/async/dist/async.js:5324:14)
    at Object.waterfall (/home/ubuntu/nodebb/node_modules/async/dist/async.js:5334:5)
    at Object.Messaging.addMessage (/home/ubuntu/nodebb/src/messaging/create.js:47:9)
    at addMessage (/home/ubuntu/nodebb/node_modules/nodebb-plugin-import/server/importer/index.js:963:31)
    at /home/ubuntu/nodebb/node_modules/nodebb-plugin-import/server/importer/index.js:940:25
    at /home/ubuntu/nodebb/node_modules/nodebb-plugin-import/server/augmented/messages.js:92:11
    at /home/ubuntu/nodebb/node_modules/nodebb-plugin-import/node_modules/async/lib/async.js:251:17
    at done (/home/ubuntu/nodebb/node_modules/nodebb-plugin-import/node_modules/async/lib/async.js:132:19)
    at /home/ubuntu/nodebb/node_modules/nodebb-plugin-import/node_modules/async/lib/async.js:32:16
    at /home/ubuntu/nodebb/node_modules/nodebb-plugin-import/node_modules/async/lib/async.js:248:21
    at /home/ubuntu/nodebb/node_modules/nodebb-plugin-import/node_modules/async/lib/async.js:572:34
    2018-07-20T03:24:23.394Z [25675] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
    ...

    1 Reply Last reply
    0
  • S Offline
    S Offline
    signal15
    wrote on last edited by
    #2

    I disabled all plugins using nodebb reset -p. Then I uninstalled the import and import-smf plugin. Restarted nodebb, reinstalled the import plugin, and allowed it to install the import-smf plugin. I ran the import again with the flush option, and I'm still getting the same error.

    Note that ALL plugins are disabled except for the import and import-smf plugin.

    Any ideas here?

    1 Reply Last reply
    0
  • S Offline
    S Offline
    signal15
    wrote on last edited by
    #3

    This looks like the offending code:

    function once(fn) {
        return function () {
            if (fn === null) return;
            var callFn = fn;
            fn = null;
            callFn.apply(this, arguments);
        };
    }
    
    PitaJP 1 Reply Last reply
    0
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    replied to signal15 on last edited by PitaJ
    #4

    @signal15 nothing about that code looks wrong to me. If you're pointing to this because an error occurred there, it's most likely because of code somewhere else.

    S 1 Reply Last reply
    0
  • S Offline
    S Offline
    signal15
    replied to PitaJ on last edited by
    #5

    @pitaj, after looking more into it, you're right. But, I still have no idea what the problem might be. My SMF database has NOT been converted to UTF-8. Is the importer expecting UTF-8 content?

    1 Reply Last reply
    0
  • DravereD Offline
    DravereD Offline
    Dravere
    wrote on last edited by
    #6

    Have you read the readme of the import plugin? Especially that giant section saying:

    THIS PLUGIN ONLY SUPPORTS: NodeBB v1.7.5

    I don't know if it is that but at least that might be a possibility since you're saying in the opened issue that you're using the latest NodeBB? 🙂

    1 Reply Last reply
    0
  • S Offline
    S Offline
    signal15
    wrote on last edited by
    #7

    @dravere,

    Doh! I did not see that. I just installed 1.7.5 and everything has been imported just fine. Maybe I should read the manual. 🙂

    Thanks!

    1 Reply Last reply
    0
  • S Offline
    S Offline
    signal15
    wrote on last edited by
    #8

    Thinking about this further, it seems like the functionality of this plugin should probably be merged/maintained with master since it's such a core component influencing adoption of NodeBB.

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development