Some page types do not have an HTML template, for example first and second level menu items. When accessing these pages by their path, one will be redirected to a subpage that can be rendered (see also #394). However, the page preview in the Wagtail admin interface does not follow the redirect and thus fails.
Steps to reproduce
Create a new first or second level menu item page
Fill out all required fields (page title, slug, …) so that there a no validation errors
Open the live preview of the wagtail editor
Expected behavior
There is no live preview for pages without a template or the error is caught and a user-friendly notice is shown.
Actual behavior
A TemplateDoesNotExist exception is thrown and not caught. This causes an unspecific internal server error message (or the exact stack trace in debug mode) to be displayed.
Additional context
Wagtail remembers whether a user used the live preview panel when editing a page last time and reopens it when visiting the editor for any page. Therefore, this error does not only occur when manually opening the live preview for a menu item (why should anyone do this), but also when the current user used the live preview on a information/minutes page before.
I don't know whether this some issue in our code or a problem of Wagtail itself. The Wagtail repo does not seem to have an issue for this yet.
Some page types do not have an HTML template, for example first and second level menu items. When accessing these pages by their path, one will be redirected to a subpage that can be rendered (see also #394). However, the page preview in the Wagtail admin interface does not follow the redirect and thus fails.
Steps to reproduce
Expected behavior
There is no live preview for pages without a template or the error is caught and a user-friendly notice is shown.
Actual behavior
A
TemplateDoesNotExist
exception is thrown and not caught. This causes an unspecific internal server error message (or the exact stack trace in debug mode) to be displayed.Additional context
Wagtail remembers whether a user used the live preview panel when editing a page last time and reopens it when visiting the editor for any page. Therefore, this error does not only occur when manually opening the live preview for a menu item (why should anyone do this), but also when the current user used the live preview on a information/minutes page before.
I don't know whether this some issue in our code or a problem of Wagtail itself. The Wagtail repo does not seem to have an issue for this yet.