﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
33830	Variable lookup errors are logged rendering 'clearable_file_input.html'	Horst Schneider	Neeraj Kumar	"It seems like the fix to #31536 raised a problem similar to #32681: Not checking whether the `disabled` attribute actually exists on the `attrs` of the 'clear' checkbox widget causes a `VariableDoesNotExist` exception to be logged every time one of the patched `clearable_file_input.html` templates is rendered with a checkbox that has no `disabled` atrribute (i.e. is enabled):

{{{
[2022-07-06 10:06:03,452] DEBUG django.template base: Exception while resolving variable 'disabled' in template 'admin/widgets/clearable_file_input.html'.
Traceback (most recent call last):
  File ""/home/horst/some_project/venv/lib/python3.10/site-packages/django/template/base.py"", line 875, in _resolve_lookup
    current = current[bit]
KeyError: 'disabled'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ""/home/horst/some_project/venv/lib/python3.10/site-packages/django/template/base.py"", line 885, in _resolve_lookup
    current = getattr(current, bit)
AttributeError: 'dict' object has no attribute 'disabled'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ""/home/horst/some_project/venv/lib/python3.10/site-packages/django/template/base.py"", line 891, in _resolve_lookup
    current = current[int(bit)]
ValueError: invalid literal for int() with base 10: 'disabled'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ""/home/horst/some_project/venv/lib/python3.10/site-packages/django/template/base.py"", line 898, in _resolve_lookup
    raise VariableDoesNotExist(
django.template.base.VariableDoesNotExist: Failed lookup for key [disabled] in {'id': 'id_document'}
}}}
"	Bug	closed	contrib.admin	4.0	Normal	fixed	admin, template	Neeraj Kumar	Ready for checkin	1	0	0	0	0	0
