Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Presence of custom error.hbs page throws 500 error for missing non-admin pages. #1213

thgaskell opened this issue Oct 21, 2013 · 0 comments


Copy link

commented Oct 21, 2013

If a custom error.hbs is found and you navigate to a non-admin page that doesn't exist, Ghost will respond with a 500 error and dump the stack trace to the page if it's in development mode, or Internal Server Error in production mode.

Expected: 404 response and render custom error.hbs page.

Steps to replicate error:

  • Create file at core/content/themes/error.hbs (currently where Ghost checks for custom error page)
  • Run npm start or npm start --production
  • Visit (or some other non-admin page that doesn't exist)

Page results

Error: Failed to lookup view "error"
    at (/home/vagrant/code/Ghost/node_modules/express/lib/application.js:494:17)
    at ServerResponse.res.render (/home/vagrant/code/Ghost/node_modules/express/lib/response.js:756:7)
    at renderErrorInt (/home/vagrant/code/Ghost/core/server/errorHandling.js:144:17)
    at Object.errors.renderErrorPage (/home/vagrant/code/Ghost/core/server/errorHandling.js:157:20)
    at Object.errors.error500 (/home/vagrant/code/Ghost/core/server/errorHandling.js:192:20)
    at (/home/vagrant/code/Ghost/node_modules/express/node_modules/connect/lib/proto.js:185:17)
    at fn (/home/vagrant/code/Ghost/node_modules/express/lib/response.js:751:25)
    at (/home/vagrant/code/Ghost/node_modules/express/lib/application.js:496:14)
    at ServerResponse.res.render (/home/vagrant/code/Ghost/node_modules/express/lib/response.js:756:7)
    at renderErrorInt (/home/vagrant/code/Ghost/core/server/errorHandling.js:144:17)
Internal Server Error
halfdan added a commit to halfdan/Ghost that referenced this issue Oct 21, 2013
@ErisDS ErisDS closed this Oct 23, 2013
jptacek added a commit to jptacek/Ghost that referenced this issue Nov 4, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.