Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#26280 closed Bug (fixed)

Cached template loader crashes when loading nonexistent template

Reported by: Ivan Tsouvarev Owned by: nobody
Component: Template system Version: 1.9
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If you use cached loader to load non-existing template, then you will get TypeError: __init__() takes at least 2 arguments (1 given), because TemplateDoesNotExist raised without message

Change History (4)

comment:1 Changed 4 years ago by Tim Graham

Component: UncategorizedTemplate system
Has patch: set
Needs tests: set
Summary: TemplateDoesNotExists raised without messageCached template loader crashes when loading nonexistent template
Triage Stage: UnreviewedAccepted
Type: UncategorizedBug
Version: 1.91.8

Looks to me like this affects 1.8 as well (blamed the line modified in the PR to f33db5a09acfc3df3085235a5712c46094eb9a0d which was added in 1.7).

comment:2 Changed 4 years ago by Tim Graham

Needs tests: unset
Triage Stage: AcceptedReady for checkin
Version: 1.81.9

Actually, the crash is a regression in Django 1.9.

comment:3 Changed 4 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: newclosed

In 8890c53:

Fixed #26280 -- Fixed cached template loader crash when loading nonexistent template.

comment:4 Changed 4 years ago by Tim Graham <timograham@…>

In cd46947d:

[1.9.x] Fixed #26280 -- Fixed cached template loader crash when loading nonexistent template.

Backport of 8890c533e0b53cb0021bd5faf15668430cd3075a from master

Note: See TracTickets for help on using tickets.
Back to Top