Opened 11 years ago

Closed 11 years ago

Last modified 11 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 by Tim Graham, 11 years ago

Component: Uncategorized → Template system
Has patch: set
Needs tests: set
Summary: TemplateDoesNotExists raised without message → Cached template loader crashes when loading nonexistent template
Triage Stage: Unreviewed → Accepted
Type: Uncategorized → Bug
Version: 1.9 → 1.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 by Tim Graham, 11 years ago

Needs tests: unset
Triage Stage: Accepted → Ready for checkin
Version: 1.8 → 1.9

Actually, the crash is a regression in Django 1.9.

comment:3 by Tim Graham <timograham@…>, 11 years ago

Resolution: → fixed
Status: new → closed

In 8890c53:

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

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

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