Invalid front matter causes 500 server error #16624
Labels
area: publishing experience
issues related to an authors experience publishing. Tags, series, etc.
bug
always open for contribution
external contributors welcome
contribution is welcome!
Describe the bug
When I have the Basic Markdown editor (editor v1)
When creating a new post with this content (rather than hash keys, a plain string, in the frontmatter)
When I preview the post, I get a 500 server error (and no indication why).
To Reproduce
visit /settings/customization and confirm Basic Markdown Editor Version is selected
click Create Post
Erase the frontmatter template (title/ cover image, tags) and replace with a simple string.
Click the preview tab.
Expected behavior
Either the frontmatter delimiter dashes
---
are treated as horizontal rules when no key-value pairs are provided, or an indication that the frontmatter is invalid is shown to the user.Screenshots
Additional context
https://app.honeybadger.io/projects/66984/faults/84085022 (no method
to_h
for String atparsed.front_matter.to_h
inArticlesController#preview
)Started after #16569 fixed another error showing on article preview
The text was updated successfully, but these errors were encountered: