Hi @psychobunny any chance to have this updated to work with nodeBB 1.1.x ? It's a killer feature for my photography forum 🙂
Error installing nodebb-widget-ns-stats
I am getting an error installing nodebb-widget-ns-stats 1.01 on hosted NodeBB v0.9.3. @Nicolas
"error: TypeError: Cannot read property 'uid' of undefined
When was the plugin last updated? It's probably wildly out of date.
@rspk component uses
getUsersDatamethod of User module from NodeBB.
You have a case when response doesn't provide user objects, that is why
uidcan't be accessed.
Is it related to user deletion?
@Nicolas In that case I'd recommend your plugin do a
user = users.filter(Boolean);to catch cases where the user object retrieved from NodeBB via db is null/not set.
I still have just assumptions.
@julian could you clarify when it can occur?
@Nicolas In this case... you're calling getUsersData, and that just makes a call to MongoDB passing in the uids. If you pass in invalid uids (that is, perhaps they don't exist or were deleted, as you say), then it will return null.
Best to filter as advised. In @rspk's case, he's running a forum with migrated data.
@rspk should be resolved