Custom error page isn't used #2513

Closed
ErisDS opened this Issue Mar 26, 2014 · 1 comment

Comments

Projects
None yet
2 participants
Owner

ErisDS commented Mar 26, 2014

Adding an error.hbs file to a theme no longer results in blog errors being rendered using that template.

Steps to Reproduce

  1. Add an error.hbs file to your theme
  2. Visit a page that doesn't exist
  3. The error is still rendered using the ghost 404 template

Technical details:

  • Ghost Version: 0.4.2

ErisDS added this to the 0.5 milestone Mar 26, 2014

@ErisDS ErisDS added bug themes labels Mar 26, 2014

sluckxz commented Mar 26, 2014

It is possible to get custom error pages rendered without modifying core by using a symlink from error to the file error.hbs in the root directory of your default theme.

For me that is
ln -s /home/ghostuser/Ghost/content/themes/casper/error.hbs /home/ghostuser/Ghost/content/themes/casper/error

If you are in the root of your default theme folder with error.hbs already created at that location then
ln -s ./error.hbs error

Caveat this workaround depends on shell access. It's possible that some hosts will have a function in their respective panels to get this done for you. Otherwise a request to support might get a symbolic link added.

@novaugust novaugust added a commit to novaugust/Ghost that referenced this issue Mar 28, 2014

@novaugust novaugust Fixed check for a theme's custom error.hbs:
Closes #2513
- Checks for property `error.hbs` on active theme
- Added unit test to ensure `error` view is rendered when activeTheme has
  a custom error template.
b1609c9

@novaugust novaugust added a commit to novaugust/Ghost that referenced this issue Mar 28, 2014

@novaugust novaugust Fixed check for a theme's custom error.hbs:
Closes #2513
- Checks for property `error.hbs` on active theme
- Added unit test to ensure `error` view is rendered when activeTheme has
  a custom error template.
d18fb88

@novaugust novaugust added a commit to novaugust/Ghost that referenced this issue Mar 28, 2014

@novaugust novaugust Fixed check for a theme's custom error.hbs:
Closes #2513
- Checks for property `error.hbs` on active theme
- Added unit test to ensure `error` view is rendered when activeTheme has
  a custom error template.
b58e018

ErisDS closed this in 345fe1a Apr 6, 2014

@aiampogi aiampogi added a commit to aiampogi/Ghost that referenced this issue Apr 14, 2014

@novaugust @aiampogi novaugust + aiampogi Fixed check for a theme's custom error.hbs:
Closes #2513
- Checks for property `error.hbs` on active theme
- Added unit test to ensure `error` view is rendered when activeTheme has
  a custom error template.
- Removed unused variable, `userErrorTemplatePath` from errorHandler
- Refactored errorHandler.`updateActiveTheme` to take one argument, the new active theme, and to then check if the active theme has an error.hbs
- Changed errorHandler unit test to use rewire for mocking config.
42fda11

@ErisDS ErisDS modified the milestone: 0.6 Apps Sep 2, 2014

@morficus morficus pushed a commit to morficus/Ghost that referenced this issue Sep 4, 2014

@novaugust novaugust Fixed check for a theme's custom error.hbs:
Closes #2513
- Checks for property `error.hbs` on active theme
- Added unit test to ensure `error` view is rendered when activeTheme has
  a custom error template.
- Removed unused variable, `userErrorTemplatePath` from errorHandler
- Refactored errorHandler.`updateActiveTheme` to take one argument, the new active theme, and to then check if the active theme has an error.hbs
- Changed errorHandler unit test to use rewire for mocking config.
352e229
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment