TypeError: Cannot read properties of undefined (reading 'split')
-
@baris this is my
helpers.js
:parts.push(`theme-${meta.config['theme:id'].split('-')[2]}`);
This is
git status
:root@server:/home/nodebb/src/middleware# git status On branch v2.x Your branch is up to date with 'origin/v2.x'. nothing to commit, working tree clean
There's nothing difference between my files are git.
-
@inna please execute the mongo command baris provided, and post the result
-
Hi, this is the result, it's
null
:root@iran:/home/nodebb# mongo MongoDB shell version v4.0.28 connecting to: mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb Implicit session: session { "id" : UUID("SOMEID") } MongoDB server version: 4.0.28 > db.objects.findOne({_key: "config"}); null >
-
@inna you'll need to select the NodeBB database then run the command.
-
@inna said in TypeError: Cannot read properties of undefined (reading 'split'):
Hi, that's it:
> use nodebb switched to db nodebb > db.objects.findOne({_key: "config"}); null
That's when
authorization
is disabled and I get the above output.The following is when
authorization
is enabled:> db.objects.findOne({_key: "config"}); 2022-08-20T21:35:32.379+0430 E QUERY [js] Error: error: { "ok" : 0, "errmsg" : "not authorized on test to execute command { find: \"objects\", filter: { _key: \"config\" }, limit: 1.0, singleBatch: true, lsid: { id: UUID(\"f06f4d62-6d71-4f1d-b23c-7e6293adf942\") }, $db: \"test\" }", "code" : 13, "codeName" : "Unauthorized" } : _getErrorWithCode@src/mongo/shell/utils.js:25:13 DBCommandCursor@src/mongo/shell/query.js:708:1 DBQuery.prototype._exec@src/mongo/shell/query.js:113:28 DBQuery.prototype.hasNext@src/mongo/shell/query.js:288:5 DBCollection.prototype.findOne@src/mongo/shell/collection.js:260:10 @(shell):1:1
-
Hi, a have a same error (Cannot read properties of undefined (reading 'split')) on my forum. Please, write final solution have you solve it
-
@Nuran-Akimbek said in TypeError: Cannot read properties of undefined (reading 'split'):
Hi, a have a same error (Cannot read properties of undefined (reading 'split')) on my forum. Please, write final solution have you solve it
I solved it by doing a
./nodebb restart