@힙찔이닷컴 You should elaborate a bit more here and provide at least an error message - or better still, a detailed overview of what isn't working, or what results you got instead of what you expected.
It's impossible for us to help you without this.
in our key store we have
key values in the following formats:
"categories:21:tid"
"categories:recent_posts:cid:2"
"categories:cid"
"category:3"
we see the following function return null/undefined:
Categories.getAllCategories = function(uid, callback) {
db.getSortedSetRange('categories:cid', 0, -1, function(err, cids) {
if(err) {
return callback(err);
}
if(cids && cids.length === 0) {
return callback(null, {categories : []});
}
Categories.getCategories(cids, uid, callback);
});
};
##Dumping categories:cid
redis 127.0.0.1:6379[5]> dump categories:cid
"\n>>\x00\x00\x00:\x00\x00\x00\x15\x00\x00\xf2\x02\xf3\x02\xf4\x02\xf5\x02\xf6\x02\xf7\x02\xf8\x02\xf9\x02\xfa\x02\xfb\x02\xfc\x02\xfd\x02\xfe\r\x03\xfe\x0e\x03\xfe\x0f\x03\xfe\x10\x03\xfe\x11\x03\xfe\x12\x03\xfe\x13\x03\xfe\x14\x03\xfe\x15\xff\x06\x00\xc5V7c\x9a\x06\x1d\xec"
silent error and death on upgrade
info: NodeBB v0.3.2 Copyright (C) 2013 DesignCreatePlay Inc.
info: This program comes with ABSOLUTELY NO WARRANTY.
info: This is free software, and you are welcome to redistribute it under certain conditions.
info:
info: Time: Thu Feb 27 2014 06:16:11 GMT+0000 (UTC)
info: Initializing NodeBB v0.3.2
info: * using configuration stored in: /home/ubuntu/community/config.json
info: * using redis store at 127.0.0.1:6379
info: * using themes stored in: /home/ubuntu/community/node_modules
warn: You have no redis password setup!
info: Enabling 'trust proxy'
warn: Your NodeBB schema is out-of-date. Please run the following command to bring your dataset up to spec:
warn: node app --upgrade
warn: To ignore this error (not recommended):
warn: node app --no-check-schema
excuse me
on upgrade
info: [2014/2/20] Activating NodeBB Essential Widgets
warn: [plugins/nodebb-plugin-youtube] staticDir is deprecated, use staticDirs instead
warn: [plugins/nodebb-plugin-youtube] staticDir is deprecated, define CSS files with new staticDirs instead.
warn: [plugins/nodebb-plugin-blog-comments] staticDir is deprecated, use staticDirs instead
warn: [plugins/nodebb-widget-essentials] staticDir is deprecated, use staticDirs instead
warn: [plugins/nodebb-widget-essentials] staticDir is deprecated, define CSS files with new staticDirs instead.
warn: [plugins/nodebb-plugin-chat-emote] staticDir is deprecated, use staticDirs instead
warn: [plugins/nodebb-plugin-chat-emote] staticDir is deprecated, define CSS files with new staticDirs instead.
warn: [plugins/nodebb-plugin-sso-github] staticDir is deprecated, use staticDirs instead
warn: [plugins/nodebb-plugin-imgur] staticDir is deprecated, use staticDirs instead
warn: [plugins/nodebb-plugin-sso-google] staticDir is deprecated, use staticDirs instead
warn: [plugins/nodebb-plugin-rss] staticDir is deprecated, use staticDirs instead
warn: [plugins/nodebb-plugin-sso-twitter] staticDir is deprecated, use staticDirs instead
warn: [plugins/nodebb-plugin-emoji-skype] staticDir is deprecated, use staticDirs instead
warn: [plugins/nodebb-plugin-emoji-skype] staticDir is deprecated, define CSS files with new staticDirs instead.
warn: [plugins/nodebb-plugin-cash] staticDir is deprecated, use staticDirs instead
warn: [plugins/nodebb-plugin-cash] staticDir is deprecated, define CSS files with new staticDirs instead.
warn: [plugins/nodebb-plugin-vimeo] staticDir is deprecated, use staticDirs instead
warn: [plugins/nodebb-plugin-vimeo] staticDir is deprecated, define CSS files with new staticDirs instead.
info: Enabling 'trust proxy'
error: [app] Encountered Uncaught Exception: path must be a string
TypeError: path must be a string
at Object.fs.readdir (fs.js:649:11)
at Object.Meta.themes.get (/home/ubuntu/community/src/meta.js:89:7)
at /home/ubuntu/community/src/webserver.js:350:19
at /home/ubuntu/community/node_modules/async/lib/async.js:505:21
at /home/ubuntu/community/node_modules/async/lib/async.js:221:13
at /home/ubuntu/community/node_modules/async/lib/async.js:105:13
at Array.forEach (native)
at _each (/home/ubuntu/community/node_modules/async/lib/async.js:32:24)
at async.each (/home/ubuntu/community/node_modules/async/lib/async.js:104:9)
at _asyncMap (/home/ubuntu/community/node_modules/async/lib/async.js:220:9)
error: [app] Could not restart server. Shutting down.
info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
info: [app] Database connection closed.
info: [app] Goodbye!
###themePath not a string? or file names not string? possible hidden files .file?
fs.readdir(themePath, function (err, files) {
async.filter(files, function (file, next) {
fs.stat(path.join(themePath, file), function (err, fileStat) {
if (err) {
return next(false);
}
next((fileStat.isDirectory() && file.slice(0, 13) === 'nodebb-theme-'));
});
}, function (themes) {
async.map(themes, function (theme, next) {
var config = path.join(themePath, theme, 'theme.json');
if (fs.existsSync(config)) {
fs.readFile(config, function (err, file) {
if (err) return next();
else {
var configObj = JSON.parse(file.toString());
next(err, configObj);
}
});
} else {
next();
}
}, function (err, themes) {
themes = themes.filter(function (theme) {
return (theme !== undefined);
});
callback(null, themes);
});
});
});
It is better to do that from the admin control panel.
But if you don't have access to the ACP.
hget group:gid administrators
"1" <- use this value
sadd gid:1:members <uid>
replace <uid>
with your user id.
To get the user id use :
hget username:uid <yourusername>