Exceptions from wagtail templates
Opened this issue · 1 comments
arslanashraf7 commented
Description:
I recently noticed that wagtail has been logging some exceptions when you access any of the wagtail pages. Although the functionality works fine without any visible errors on the frontend template exceptions are raised.
Steps to reproduce:
- Get yourself to master or even release branch
- Build containers and perform setup steps e.g.
seed_data, configure_cms
- Access any pages on the
/cms
- Exceptions will be logged
Acceptance Criteria:
- Exceptions should not be logged, their might probably be something related to thew config of wagtal version but that might need more digging.
Error log:
web_1 | [2022-01-06 12:43:04] DEBUG 11 [django.template] base.py:868 - [4b18fbf494c7] - Exception while resolving variable 'show_parent' in template 'wagtailadmin/pages/index.html'.
web_1 | Traceback (most recent call last):
web_1 | File "/usr/local/lib/python3.9/site-packages/django/template/base.py", line 829, in _resolve_lookup
web_1 | current = current[bit]
web_1 | File "/usr/local/lib/python3.9/site-packages/django/template/context.py", line 83, in __getitem__
web_1 | raise KeyError(key)
web_1 | KeyError: 'show_parent'
web_1 |
web_1 | During handling of the above exception, another exception occurred:
web_1 |
web_1 | Traceback (most recent call last):
web_1 | File "/usr/local/lib/python3.9/site-packages/django/template/base.py", line 835, in _resolve_lookup
web_1 | if isinstance(current, BaseContext) and getattr(type(current), bit):
web_1 | AttributeError: type object 'RequestContext' has no attribute 'show_parent'
web_1 |
web_1 | During handling of the above exception, another exception occurred:
web_1 |
web_1 | Traceback (most recent call last):
web_1 | File "/usr/local/lib/python3.9/site-packages/django/template/base.py", line 843, in _resolve_lookup
web_1 | current = current[int(bit)]
web_1 | ValueError: invalid literal for int() with base 10: 'show_parent'
web_1 |
web_1 | During handling of the above exception, another exception occurred:
web_1 |
web_1 | Traceback (most recent call last):
web_1 | File "/usr/local/lib/python3.9/site-packages/django/template/base.py", line 848, in _resolve_lookup
web_1 | raise VariableDoesNotExist("Failed lookup for key "
pdpinch commented
I think this has been a problem on bootcamps for sometime. If you search through the Slack channel history you may seem some mention of it. It would be nice to get it fixed, because it can clog up the logs.