• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

Uncaught Exception: Cannot call method 'replace' of undefined

Scheduled Pinned Locked Moved Bug Reports
5 Posts 2 Posters 1.6k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    eep
    wrote on last edited by eep
    #1

    when I installed in my local vagrant, I got the error.

    error: [app] Encountered Uncaught Exception: Cannot call method 'replace' of undefined
    TypeError: Cannot call method 'replace' of undefined
    at /vagrant/NodeBB/src/webserver.js:151:31
    at Array.map (native)
    at /vagrant/NodeBB/src/webserver.js:150:77
    at Object.Plugins.fireHook (/vagrant/NodeBB/src/plugins.js:339:5)
    at Function.app.build_header (/vagrant/NodeBB/src/webserver.js:103:11)
    at async.waterfall.topic_url (/vagrant/NodeBB/src/webserver.js:639:10)
    at fn (/vagrant/NodeBB/node_modules/async/lib/async.js:582:34)
    at Object._onImmediate (/vagrant/NodeBB/node_modules/async/lib/async.js:498:34)
    at processImmediate [as _immediateCallback] (timers.js:330:15)
    info: [app] Restarting...
    info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
    info: [app] Database connection closed.
    info: [app] Goodbye!
    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 05:17:55 GMT+0000 (UTC)
    info: Initializing NodeBB v0.3.2
    info: * using configuration stored in: /vagrant/NodeBB/config.json
    info: * using redis store at 127.0.0.1:6379
    info: * using themes stored in: /vagrant/NodeBB/node_modules
    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-theme-lavender] staticDir is deprecated, use staticDirs instead
    info: NodeBB attempting to listen on: 0.0.0.0:8080
    info: NodeBB Ready
    replace.png

    1 Reply Last reply
    0
  • barisB Offline
    barisB Offline
    <baris> NodeBB
    wrote on last edited by
    #2

    Can you update to https://github.com/designcreateplay/NodeBB/commit/b8c089cfaa33a94dcd29bc33217fe58ab601c8b9 and let us know what output you get in console?

    E 1 Reply Last reply
    0
  • barisB Offline
    barisB Offline
    <baris> NodeBB
    wrote on last edited by
    #3

    Ignore previous commit try with this https://github.com/designcreateplay/NodeBB/commit/38e4a6c8b068dbcc9126c92636ec04e09838f02b

    1 Reply Last reply
    0
  • E Offline
    E Offline
    eep
    replied to <baris> on last edited by eep
    #4

    @baris

    warn: Invalid meta tag.[object Object]
    { property: 'keywords', content: '' }
    warn: Invalid meta tag.[object Object]
    { name: 'description', content: '' }

    with the code:

    console.log(tag)```
    1 Reply Last reply
    0
  • barisB Offline
    barisB Offline
    <baris> NodeBB
    wrote on last edited by baris
    #5

    Well an empty string shouldn't crash

    tag.content = tag.content.replace(/[&<>'"]/g, function(tag) {
    	return escapeList[tag] || tag;
    });
    

    Make sure you are on latest on both nodebb and the lavender theme. Are you still getting any crashes?

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development