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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Fixed 500 errors for invalid theme layouts #19848

Merged

Conversation

allouis
Copy link
Contributor

@allouis allouis commented Mar 12, 2024

ref ENG-742
ref https://linear.app/tryghost/issue/ENG-742

We don't do any parsing of layouts in gscan, which means themes can be uploaded which use non-existent files for their layout.

We can catch the error in the res.render call, and wrap it, just like we do for missing templates (e.g. the StaticRoutesRouter)

ref ENG-742
ref https://linear.app/tryghost/issue/ENG-742

We don't do any parsing of layouts in gscan, which means themes can be uploaded
which use non-existent files for their layout.

We can catch the error in the res.render call, and wrap it, just like we do for
missing templates (e.g. the StaticRoutesRouter)
@allouis allouis force-pushed the egg-eng-742-fix-500-error-when-non-existent-template-is-used branch from bd4afd4 to 1e4cfde Compare March 12, 2024 19:38
@allouis allouis merged commit aaa19a5 into main Mar 14, 2024
20 checks passed
@allouis allouis deleted the egg-eng-742-fix-500-error-when-non-existent-template-is-used branch March 14, 2024 16:12
Copy link

sentry-io bot commented Mar 20, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • 鈥硷笍 Failed to lookup view "page-salarycalculator-beta" in views directory "/home/ghost/content/themes/pma-staging-2": An unexpected error occurred, please try again. GET /:slug/:options(edit)?/ View Issue
  • 鈥硷笍 Failed to lookup view "index" in views directory "/home/ghost/content/themes/saaga": An unexpected error occurred, please try again. GET / View Issue
  • 鈥硷笍 Failed to lookup view "tag" in views directory "/home/ghost/content/themes/newspaper": An unexpected error occurred, please try again. GET /tag/:slug/ View Issue

Did you find this useful? React with a 馃憤 or 馃憥

royalfig pushed a commit that referenced this pull request Mar 25, 2024
ref ENG-742
ref https://linear.app/tryghost/issue/ENG-742

We don't do any parsing of layouts in gscan, which means themes can be
uploaded which use non-existent files for their layout.

We can catch the error in the res.render call, and wrap it, just like we
do for missing templates (e.g. the StaticRoutesRouter)
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 this pull request may close these issues.

None yet

1 participant