Bump
Nothing?
Bump
Nothing?
Is it easy/possible to transfer additional info besides the username/email/location when a new user logs in for the first time and a forum user is created for them?
{posts.user.location}
in my template comes back blank. Does the renderer intentionally leave that and other data out?
@dravere How would you achieve filtering out every "plugins/fireHook]" line that does NOT also have a certain string? (inclusion as opposed to exclusion)
Maybe this could be configured to limit hook logs to a match a string. So you could tell it to log only "action" or "post" and that would control the spam
To get a shorter path to understanding when certain hooks fire.
I'm developing my first plugin and would like to see what hooks are firing. Can nodebb be configured to log all hooks?
root@community:/var/nodebb# systemctl stop nodebb
root@community:/var/nodebb# ./nodebb build
started
2018-06-07T16:34:56.255Z [7073] - warn: You have no mongo username/password setup!
2018-06-07T16:34:56.747Z [7073] - info: [build] Building in parallel mode
2018-06-07T16:34:56.748Z [7073] - info: [build] plugin static dirs build started
2018-06-07T16:34:56.751Z [7073] - info: [build] requirejs modules build started
2018-06-07T16:34:56.752Z [7073] - info: [build] client js bundle build started
2018-06-07T16:34:56.754Z [7073] - info: [build] admin js bundle build started
2018-06-07T16:34:56.754Z [7073] - info: [build] client side styles build started
2018-06-07T16:34:56.755Z [7073] - info: [build] admin control panel styles build started
2018-06-07T16:34:56.756Z [7073] - info: [build] templates build started
2018-06-07T16:34:56.757Z [7073] - info: [build] languages build started
2018-06-07T16:34:56.757Z [7073] - info: [build] sounds build started
2018-06-07T16:34:57.113Z [7073] - info: [build] sounds build completed in 0.356sec
2018-06-07T16:34:57.268Z [7073] - info: [build] plugin static dirs build completed in 0.52sec
2018-06-07T16:35:00.633Z [7073] - info: [build] client js bundle build completed in 3.881sec
2018-06-07T16:35:00.634Z [7073] - info: [build] admin js bundle build completed in 3.88sec
2018-06-07T16:35:00.758Z [7073] - info: [build] languages build completed in 4.001sec
2018-06-07T16:35:00.761Z [7073] - info: [build] templates build completed in 4.005sec
2018-06-07T16:35:00.930Z [7073] - info: [build] client side styles build completed in 4.176sec
2018-06-07T16:35:01.997Z [7073] - info: [build] requirejs modules build completed in 5.246sec
2018-06-07T16:35:02.096Z [7073] - info: [build] admin control panel styles build completed in 5.341sec
2018-06-07T16:35:02.097Z [7073] - info: [build] Asset compilation successful. Completed in 5.35sec.
root@community:/var/nodebb# systemctl start nodebb
Also no errors thrown trying to visit the Import page except for the 404 returned by the server.
No errors in the logs after clearing them, stopping nodebb, rebuilding and restarting.
If I try to build while nodebb it's running, nodebb build
hangs after completing 8/9 of the tasks and I have to CTRL+C out. Nothing is added to the log , if it's supposed to.
I used --save
and it is in package.json. It is in the list in ACP, but not in the menus.
npm ls nodebb-plugin-import
returns
[email protected] /var/nodebb
āāā [email protected]
I've been trying to use nodebb-plugin-import on our live forum after successfully importing on localhost but I've been running into these issues. (Both sites are 1.8.2)
First, the plugin is not found by Install Plugins > Search, so I npm install
it. Then activate and rebuild.
It's not showing up under Plugins, and going directly to plugins/import returns a 404, but it does show up if I search for it in the Admin settings search box, it returns several settings on the plugin's page!
Already tried deleting and re-installing the forum, no change.
@pitaj Ah. Then I guess that was what happened for me.
I managed to get it all working on my own. Yay for me.
To others who may be scratching their heads writing an exporter, I highly recommend using Exporter.log and enable Verbose logging or you wont' see anything - but this is for when you're developing an exporting only - with finished ones probably not a good idea with big DB's.
More info about what happened can be found in output.log
Also start nodebb with root privileges or the importer won't be able to write the files it needs to.
I got my exporter's testrun() function to run without errors, but the importer plugin still gets stuck, just in a different way.
It hangs with this message displayed:
State: busy, by event: exporter.require | Phase: Progress: 0%
With nothing in the log.
Then if I restart nodebb and RESUME the import, I get this:
State: idle, by event: | Phase: categoriesImportStart Progress: 0/1, 0.0000000%
Logs (in reversed order, newest on top)
[2018-06-04T15:15:15.858Z] current phase: categoriesImportStart
[2018-06-04T15:15:15.857Z] Phase ::: categoriesImportStart
[2018-06-04T15:15:15.856Z] Skipping importGroups Phase
My category import function is really simple. The old forum doesn't have categories, so I generate a fake one.
var cid;
Exporter.getPaginatedCategories = function(start, limit, callback) {
callback = !_.isFunction(callback) ? noop : callback;
var err, map;
cid = new mongoose.Types.ObjectId;
console.log( cid );
map = {};
map[ cid ] = {
"_cid": cid, // REQUIRED
"_name": "General Discussion 2", // REQUIRED
"_description": "A place to talk about whatever you want" // OPTIONAL
};
callback( null, map );
};
Update:
I just ran the importer with a "null" exporter (one that just outputs empty hashes) and I'm getting the same behavior.
It was my exporter. I'm in the process of debugging it by testing it directly and will report if I succeed in the import or run into any other obstacles.
Just bumping this in case it got lost in the pile. I'm still stumped, and were hoping to complete this migration sooner rather than later. (If this wasn't necessary let me know and I won't do it in the future.)