debug 500 page incorrectly reports "extends" TemplateDoesNotExist errors.
|Reported by:||jabapyth||Owned by:||jabapyth|
|Severity:||Keywords:||template, error, debug, templatedoesnotexist, templatesyntaxerror|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
There are two parts to this solution (because there are two things preventing correct report of errors).
- originally the 500 page showed a TemplateSyntaxError when a TemplateDoesNotExist error was being fired (due to an improper wrapping in debug.py).
- once that was fixed, the ExtendsNode assumed that if a TemplateDoesNotExist error was thrown while getting its parent template, its parent could not be found. As you can imagine, this is not the case if the parent template extends (or includes) a template that does not exist.