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

404 error handling for admin & blog #356

Closed
ErisDS opened this issue Aug 7, 2013 · 7 comments · Fixed by #787
Closed

404 error handling for admin & blog #356

ErisDS opened this issue Aug 7, 2013 · 7 comments · Fixed by #787
Assignees
Milestone

Comments

@ErisDS
Copy link
Member

ErisDS commented Aug 7, 2013

  1. Improve 404 error handling for Ghost admin urls:

Current Behaviour:
If you navigate to /ghost/fsdf you receive an error message Cannot GET /ghost/fsdf

Desired Behaviour:
Serve a template which says Ghost 404 Page Not Found and that we can edit with a nice design later.

  1. Improve 404 error handling for blog/general urls:

Current Behaviour:
If you navigate to /fsdf (assuming there is no post with that slug) the page spins.

Desired Behaviour:
If the theme does not provide a 404.hbs template, then serve our Ghost 404 template.

@cgiffard
Copy link
Contributor

cgiffard commented Aug 8, 2013

Happy to take this one.

@JohnONolan
Copy link
Member

Ghost Admin 404 Design - #447

For the theme / front-end output, Ghost should look for 404.hbs - if none exists, it should simply output

<h1>404</h1>
<h2>Page Not Found</h2>

in {{{body}}} of default.hbs

Also make sure that {{bodyclass}} (See #389) is passed an error-404 class.

@cgiffard
Copy link
Contributor

Thanks, @JohnONolan. I'll plug that in. :)

@ErisDS
Copy link
Member Author

ErisDS commented Aug 22, 2013

Still want this? The API stuff is way more important and quite a big chunk of work ;)

@cgiffard
Copy link
Contributor

I want something small so I can get my head back into ghost-space. Small issues are good for me over the next couple of days, so I can feel like I'm achieving something.

Then I'll attack the API. :)

@ErisDS
Copy link
Member Author

ErisDS commented Sep 9, 2013

🍩 🍰

@cgiffard
Copy link
Contributor

Done. Just about to push. Finally!

cgiffard referenced this issue in cgiffard/Ghost Sep 17, 2013
Fixes #356

- Adds new generic methods for handling errors to errorHandling.js
- Initialises generic methods as middleware
- Created error.hbs view in admin
- Error handler searches for error.hbs view file in user theme folder
  and renders it if available, otherwise lets the error fall through
  to express.

- We *could* change the final behaviour to render a default ghost
  template should the user template be missing
- Because it currently isn't possible to require(ghost) in errorHandling.js,
  it was necessary to duplicate some aspects of the ghost path init code
  inside errorhandling.js. This should be cleaned up and moved back
  into ghost.js when possible.
daniellockyer pushed a commit that referenced this issue Jul 20, 2022
refs https://github.com/TryGhost/Team/issues/1037

Tiers have a new `type` column to differentiate between `free` and `paid` tiers. This change -

- sets type as paid for all new tiers created, as `free` tier is created by default
- excludes any price/stripe data change for free tier
- updates all usages of default product to fetch the first paid product from the products list in DB instead of just the first product it finds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants