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


  • 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.

  • GNU/Linux

    0.2.2 works fine.

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

    Works:

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

    Does NOT work:

    // Will fail with 404 error, because express route isn't registered.
    '/privacy' 
    // 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.
    '/secure/sales' 
    

    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.

  • GNU/Linux Admin

    @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. 😮

  • GNU/Linux Admin

    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.

    Error

  • GNU/Linux

    @lulzdevlol
    route.jpg


  • 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)

  • GNU/Linux

    @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)
  • GNU/Linux

    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

| |