[nodebb-plugin-custom-pages] "You seem to have stumbled upon a page that does not exist."

NodeBB Plugins
  • After creating a test page, i cannot find a combination of settings that produce any result other than the error, "You seem to have stumbled upon a page that does not exist."

    What is a working example of code that produces a working custom page; code structure of each field, header, body, footer.
    Where exactly are the files to be changed; a click path or full folder location.

    I tried copy pasting the global code and using an existing widget and even tried touch test.tpl in the theme folder with the other .tpl files... only the error.

  • Its possible that it broke recently, I did a blind merge from a PR Julian made a week or two ago (so its my bad):


    Can you revert by doing npm i [email protected] and let me know if it works? Also create a new issue in case I forget. Thanks!

  • tried that command: did not revert. restarted; same. Uninstalled and tried that command; did not install. Restarted and still not.

    Have been getting this error recently when installing plugins:
    sibling error.JPG
    Not at the time that i tried to revert custom pages, but it may be a factor in troubleshooting. Using Persona, as well. Not sure that error reads vanilla.

    I am unsure what i can place into the custom pages field to make it work. It has not worked at all.

  • I stumbeled upon the same issue.
    Not sure what steps to take in order to reproduce it, though it seems to happen randomly when editing widgets and reloading.

    What is interesting is that the template files gets removed from the /public/templates folder, but reappear upon a couple of restarts.

    22/9 03:01 [5842] - error:  Error: ENOENT, open '/home/atrius/nodebb/public/templates/teamspeak.tpl'
    22/9 03:01 [5842] - error: /teamspeak

    I'll try and revert back to 0.2.1 - will reply with results, @psychobunny

  • @psychobunny Any word on the formating of the html code for these boxes?

    Custom CSS in the ACP works great, but the custom pages is a mystery as of yet.

    Reinstalled custom-pages and tried to revert again, restarted and checked again; failed to revert. The forum also has not been updating to 0.8.2 when reloading.

  • 0.2.2 works fine.

    I had those (actually 404 and 503) errors only whenever I tried to nest the pages 'Route (no spaces)'.


    // https://yourforum.org/privacy
    // https://yourforum.org/gate
    // https://yourforum.org/secure-sales

    Does NOT work:

    // Will fail with 404 error, because express route isn't registered.
    // Will fail with 503 or at startup with ENOENT,
    // because NodeBB tries to read 'gate/.tpl'
    '/gate/', 'gate/'
    // Will fail at startup, because the plugin tries to create /nodebb-root/public/templates/secure/sales.tpl.
    // I assume that fs.writeFile() doesn't create folders implicity.

    Some more logic around library.js#L111-L121 should do the trick.

    As for now (0.2.2), you'd have to go with simple routes.

  • @rbeer I noticed these issues as well with the plugin. Definitely some rough edges as @psychobunny wrote it for himself to use 😄

  • It is a key plugin for me and the forum that i am building. It extends the possibilities of the software by a large margin. 😮

  • The custom-pages plugin should be compatible with v0.8.2... what's the problem?

  • I tried entering the routing as above, thank you for the correct routing format btw, but now i get a splash page for http.com. i had an error before but it appears that it was a dns error, due to the new result a day later.

    What is the format of the header, footer and content? HTML? its not been working. Any differences between what is expected by the program and traditional HTML?

  • anything working example to add to the boxes to make a valid page and i'll reverse engineer whats needed.

    Custom static pages are not loding. Whenever we try, it links to a "Not Found" page.


  • @lulzdevlol

  • The above suggestions doesn't seem to fix it. The main problem is that the template files actually gets deleted - though they reappear upon restart. I'm not able to figure out exactly what is causing it, since nothing gets parsed in the log files when it happens. (Except the error message stating that the lookup of view failed)

  • @atrius said:

    The above suggestions doesn't seem to fix it.

    Oh, yeah; indeed. You got the nasty one.

    22/9 03:01 [5842] - error:  Error: ENOENT, open '/home/atrius/nodebb/public/templates/teamspeak.tpl'
    22/9 03:01 [5842] - error: /teamspeak

    The error prevents NodeBB from starting up, ending in 3 restarts in 10 seconds, most likely an error on startup. Halting., correct?

  • @rbeer Nope, that line is not to be found within my logs and NodeBB starts up just fine.

    Full log output:

    26/9 11:57 [5974] - error:  Error: ENOENT, open '/home/atrius/pannekake-nodebb/public/templates/teamspeak.tpl'
    26/9 11:57 [5974] - error: /teamspeak
     Error: ENOENT, open '/home/atrius/pannekake-nodebb/public/templates/teamspeak.tpl'
    26/9 11:57 [5974] - error:  Error: Failed to lookup view "teamspeak" in views directory "/home/atrius/pannekake-nodebb/public/templates"
    at EventEmitter.render (/home/atrius/pannekake-nodebb/node_modules/express/lib/application.js:579:17)
    at ServerResponse.render (/home/atrius/pannekake-nodebb/node_modules/express/lib/response.js:961:7)
    at ServerResponse.res.render (/home/atrius/pannekake-nodebb/src/middleware/middleware.js:349:10)
    at renderCustomPage (/home/atrius/pannekake-nodebb/node_modules/nodebb-plugin-custom-pages/library.js:11:6)
    at Layer.handle [as handle_request] (/home/atrius/pannekake-nodebb/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/atrius/pannekake-nodebb/node_modules/express/lib/router/route.js:131:13)
    at /home/atrius/pannekake-nodebb/src/middleware/middleware.js:195:5
    at /home/atrius/pannekake-nodebb/public/src/modules/translator.js:156:6
    at /home/atrius/pannekake-nodebb/public/src/modules/translator.js:177:4
    at Object.translator.load (/home/atrius/pannekake-nodebb/public/src/modules/translator.js:206:5)
  • That's odd.

    I actually can't reproduce your error. On 3 different setups, it's just working as long as you don't use / in the route field.

    Does running the forum with ./nodebb dev instead of start give more information? Because that's not a 'Full log'.

  • Sooooo, that worked. 🙂

    Removed the whack and it started working right away.

Suggested Topics