Does the forum logs give an error when it crashes?
Do you have mongo and nginx logs on?
There should be some useful information in one of the logs as to what is happening.
Stack trace:
nodebb.min.js?1423182085268:17950 Uncaught TypeError: undefined is not a function
nodebb.min.js?1423182085268:17950 checkConditional
nodebb.min.js?1423182085268:18050 parseValue
nodebb.min.js?1423182085268:18073 parse
nodebb.min.js?1423182085268:17874 parseTemplate
nodebb.min.js?1423182085268:17870 templates.parse
nodebb.min.js?1423182085268:19499 (anonymous function)
nodebb.min.js?1423182085268:3087 jQuery.Callbacks.fire
nodebb.min.js?1423182085268:3199 jQuery.Callbacks.self.fireWith
nodebb.min.js?1423182085268:8327 done
nodebb.min.js?1423182085268:8879 jQuery.ajaxTransport.send.callback
The line of the error origin:
function checkConditional(template, key, value) {
var matches = template.match(makeConditionalRegex(key)); // line 17950
if (matches !== null) {
...
And this warning shows up in the dev console:
5/2 17:21 [8896] - warn: [meta/templates] Partial not loaded: partials/fontawesome.tpl
NodeBB version: 0.6.1-dev
nodebb-theme-vanilla version: 0.2.6
Disabled all plugins, still happens.
Also happens in ACP.
Can you do this
function checkConditional(template, key, value) {
if (!template) {
var e = new Error('oops');
console.log(e.stack, key, value);
}
var matches = template.match(makeConditionalRegex(key)); // line 17950
And post the output.
@baris how would I go about doing that?
Appears to be this issue: gh#2466
function checkConditional(template, key, value) {
is in node_modules/templates.js/lib/templates.js. Just put the extra bit of code in that function and reproduce the error and check the logs.
@baris !template
didn't fire it, so I used !template.match
"Error: ops
at checkConditional (http://153.90.76.17:4567/nodebb.min.js?1423184280868:17986:12)
at checkConditionals (http://153.90.76.17:4567/nodebb.min.js?1423184280868:17976:27)
at parseValue (http://153.90.76.17:4567/nodebb.min.js?1423184280868:18099:14)
at parse (http://153.90.76.17:4567/nodebb.min.js?1423184280868:18119:17)
at parseTemplate (http://153.90.76.17:4567/nodebb.min.js?1423184280868:17874:14)
at Object.templates.parse (http://153.90.76.17:4567/nodebb.min.js?1423184280868:17860:11)
at Object.success (http://153.90.76.17:4567/nodebb.min.js?1423184280868:19564:25)
at jQuery.Callbacks.fire (http://153.90.76.17:4567/nodebb.min.js?1423184280868:3087:28)
at Object.jQuery.Callbacks.self.fireWith [as resolveWith] (http://153.90.76.17:4567/nodebb.min.js?1423184280868:3199:8)
at done (http://153.90.76.17:4567/nodebb.min.js?1423184280868:8327:15)" "!loggedIn" false
If !template
didnt fire it what is the value of template? Do a console.log(template)
to see what it is.
@baris It was caused by nodebb-widget-essentials being disabled.
Wasn't this fixed? I thought that these things failed gracefully.
Is this with latest revision from master and latest version of templates.js (0.1.15)?
Yeah I can reproduce on latest definitely a bug.
Should be fixed on latest.
@baris Appears that way
Who killed my `murica group?
That would be me
No patriotism allowed?
User created groups were never meant to be allowed on this forum, we just pushed early.