[nodebb-plugin-custom-pages] "You seem to have stumbled upon a page that does not exist."
-
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):
fix #16 by julianlam 路 Pull Request #18 路 NodeBB-Community/nodebb-plugin-custom-pages
Templates compiled now before static:app.init is called, so no need for emitter.
GitHub (github.com)
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:
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)'.
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.
-
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?
-
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 ofstart
give more information? Because that's not a 'Full log'.