Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exceptions from wagtail templates #1313

Open
arslanashraf7 opened this issue Jan 6, 2022 · 1 comment
Open

Exceptions from wagtail templates #1313

arslanashraf7 opened this issue Jan 6, 2022 · 1 comment

Comments

@arslanashraf7
Copy link
Contributor

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 pdpinch changed the title Exceptions from wagtail tempaltes Exceptions from wagtail templates Jan 6, 2022
@pdpinch
Copy link
Member

pdpinch commented Jan 6, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants