Error log full of _test/problematic_page failed

In v14, my error log is full of

_test/problematic_page failed
_test/_test_safe_render_on failed
printpreview failed
list failed

Any idea what’s going on?

1 Like

Hi
Same Issue here
did you find a solution?
error log full of test/problematic_page failed
Regards
Hemanth

“X failed” is logged when some user visits X and page is not found. This is mostly harmless and only meant for identifying any dead links.

1 Like

Am getting this issue after migrating to 14 and specifically when trying to access the Designation doctype. anyway i can troubleshoot and find out how to resolve the link?

same issue on a fresh install of 14

Error
Traceback with variables (most recent call last):
File “apps/frappe/frappe/website/serve.py”, line 18, in get_response
response = renderer_instance.render()
path = ‘_test/problematic_page’
http_status_code = 200
response = None
endpoint = ‘_test/problematic_page’
path_resolver = <frappe.website.path_resolver.PathResolver object at 0x7f0c785aaa40>
renderer_instance = <frappe.website.page_renderers.template_page.TemplatePage object at 0x7f0c7b71c040>
e = ValidationError(‘{% raise %}\nTraceback (most recent call last):\n File “apps/frappe/frappe/utils/jinja.py”, line 85, in render_template\n return get_jenv().from_string(template).render(context)\n File “env/lib/python3.10/site-packages/jinja2/environment.py”, line 1105, in from_string\n return cls.from_code(self, self.compile(source), gs, None)\n File “env/lib/python3.10/site-packages/jinja2/environment.py”, line 768, in compile\n self.handle_exception(source=source_hint)\n File “env/lib/python3.10/site-packages/jinja2/environment.py”, line 936, in handle_exception\n raise rewrite_traceback_stack(source=source)\n File “”, line 1, in template\njinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'raise'.\n’)
File “apps/frappe/frappe/website/page_renderers/template_page.py”, line 78, in render
html = self.get_html()
self = <frappe.website.page_renderers.template_page.TemplatePage object at 0x7f0c7b71c040>
File “apps/frappe/frappe/website/utils.py”, line 510, in cache_html_decorator
html = func(*args, **kwargs)
args = (<frappe.website.page_renderers.template_page.TemplatePage object at 0x7f0c7b71c040>,)
kwargs = {}
func = <function TemplatePage.get_html at 0x7f0c7c55b2e0>
File “apps/frappe/frappe/website/page_renderers/template_page.py”, line 95, in get_html
html = self.render_template()
self = <frappe.website.page_renderers.template_page.TemplatePage object at 0x7f0c7b71c040>
File “apps/frappe/frappe/website/page_renderers/template_page.py”, line 232, in render_template
html = frappe.render_template(self.source, self.context, safe_render=safe_render)
self = <frappe.website.page_renderers.template_page.TemplatePage object at 0x7f0c7b71c040>
safe_render = True
File “apps/frappe/frappe/utils/jinja.py”, line 87, in render_template
throw(
template = ‘{% raise %}\n’
context = {‘top_bar_items’: [<TopBarItem: aa215887de parent=Website Settings>, <TopBarItem: f8fa8f4441 parent=Website Settings>, <TopBarItem: 53a9efd7e1 parent=Website Settings>], ‘footer_items’: [], ‘post_login’: [{‘label’: ‘My Account’, ‘url’: ‘/me’}, {‘label’: ‘Log out’, ‘url’: ‘/?cmd=web_logout’}], ‘brand_html’: ‘Multi-Doc’, ‘copyright’: ‘Multi-Doc’, ‘disable_signup’: 1, ‘head_html’: ‘’, ‘facebook_share’: 0, ‘google_plus_one’: 0, ‘twitter_share’: 0, ‘linked_in_share’: 0, ‘footer_address’: ‘

2399 Av Jeanne-D'arc

Montréal, Qc, H1W 3V8

info@multi-doc.ca

’, ‘url’: ‘http://localhost’, ‘encoded_title’: ‘’, ‘web_include_js’: [‘website_script.js’, ‘erpnext-web.bundle.js’], ‘web_include_css’: [‘erpnext-web.bundle.css’], ‘favicon’: ‘/assets/erpnext/images/erpnext-favicon.svg’, ‘splash_image’: ‘/assets/erpnext/images/erpnext-logo.svg’, ‘theme’: <WebsiteTheme: Standard>, ‘hide_login’: 0, ‘read_only_mode’: Fals…
is_path = None
safe_render = True
TemplateError = <class ‘jinja2.exceptions.TemplateError’>
_ = <function _ at 0x7f0c7fcfc280>
get_traceback = <function get_traceback at 0x7f0c7ef47d00>
throw = <function throw at 0x7f0c7ef68280>
File “apps/frappe/frappe/init.py”, line 525, in throw
msgprint(
msg = ‘
{% raise %}\n
Traceback (most recent call last):\n  File “apps/frappe/frappe/utils/jinja.py”, line 85, in render_template\n    return get_jenv().from_string(template).render(context)\n  File “env/lib/python3.10/site-packages/jinja2/environment.py”, line 1105, in from_string\n    return cls.from_code(self, self.compile(source), gs, None)\n  File “env/lib/python3.10/site-packages/jinja2/environment.py”, line 768, in compile\n    self.handle_exception(source=source_hint)\n  File “env/lib/python3.10/site-packages/jinja2/environment.py”, line 936, in handle_exception\n    raise rewrite_traceback_stack(source=source)\n  File “”, line 1, in template\njinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'raise'.\n

exc = <class ‘frappe.exceptions.ValidationError’>
title = ‘Jinja Template Error’
is_minimizable = False
wide = False
as_list = False
File “apps/frappe/frappe/init.py”, line 493, in msgprint
_raise_exception()
title = ‘Jinja Template Error’
as_table = False
as_list = False
indicator = ‘red’
alert = False
primary_action = None
is_minimizable = False
wide = False
sys = <module ‘sys’ (built-in)>
out = {‘message’: ‘
{% raise %}\n
Traceback (most recent call last):\n  File “apps/frappe/frappe/utils/jinja.py”, line 85, in render_template\n    return get_jenv().from_string(template).render(context)\n  File “env/lib/python3.10/site-packages/jinja2/environment.py”, line 1105, in from_string\n    return cls.from_code(self, self.compile(source), gs, None)\n  File “env/lib/python3.10/site-packages/jinja2/environment.py”, line 768, in compile\n    self.handle_exception(source=source_hint)\n  File “env/lib/python3.10/site-packages/jinja2/environment.py”, line 936, in handle_exception\n    raise rewrite_traceback_stack(source=source)\n  File “”, line 1, in template\njinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'raise'.\n
’, ‘title’: ‘Jinja Template Error’, ‘indicator’: ‘red’, ‘raise_exception’: 1}
_raise_exception = <function msgprint.._raise_exception at 0x7f0c7b8941f0>
_strip_html_tags = <functools._lru_cache_wrapper object at 0x7f0c7b8c0ca0>
inspect = <module ‘inspect’ from ‘/usr/lib/python3.10/inspect.py’>
msg = ‘{% raise %}\nTraceback (most recent call last):\n File “apps/frappe/frappe/utils/jinja.py”, line 85, in render_template\n return get_jenv().from_string(template).render(context)\n File “env/lib/python3.10/site-packages/jinja2/environment.py”, line 1105, in from_string\n return cls.from_code(self, self.compile(source), gs, None)\n File “env/lib/python3.10/site-packages/jinja2/environment.py”, line 768, in compile\n self.handle_exception(source=source_hint)\n File “env/lib/python3.10/site-packages/jinja2/environment.py”, line 936, in handle_exception\n raise rewrite_traceback_stack(source=source)\n File “”, line 1, in template\njinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'raise'.\n’
raise_exception = <class ‘frappe.exceptions.ValidationError’>
strip_html_tags = <function strip_html_tags at 0x7f0c7ef2eef0>
File “apps/frappe/frappe/init.py”, line 442, in _raise_exception
raise raise_exception(msg)
inspect = <module ‘inspect’ from ‘/usr/lib/python3.10/inspect.py’>
msg = ‘{% raise %}\nTraceback (most recent call last):\n File “apps/frappe/frappe/utils/jinja.py”, line 85, in render_template\n return get_jenv().from_string(template).render(context)\n File “env/lib/python3.10/site-packages/jinja2/environment.py”, line 1105, in from_string\n return cls.from_code(self, self.compile(source), gs, None)\n File “env/lib/python3.10/site-packages/jinja2/environment.py”, line 768, in compile\n self.handle_exception(source=source_hint)\n File “env/lib/python3.10/site-packages/jinja2/environment.py”, line 936, in handle_exception\n raise rewrite_traceback_stack(source=source)\n File “”, line 1, in template\njinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'raise'.\n’
raise_exception = <class ‘frappe.exceptions.ValidationError’>
frappe.exceptions.ValidationError: {% raise %}
Traceback (most recent call last):
File “apps/frappe/frappe/utils/jinja.py”, line 85, in render_template
return get_jenv().from_string(template).render(context)
File “env/lib/python3.10/site-packages/jinja2/environment.py”, line 1105, in from_string
return cls.from_code(self, self.compile(source), gs, None)
File “env/lib/python3.10/site-packages/jinja2/environment.py”, line 768, in compile
self.handle_exception(source=source_hint)
File “env/lib/python3.10/site-packages/jinja2/environment.py”, line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File “”, line 1, in template
jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag ‘raise’.

So Finally found the culprit. it seems post migration, permissions for the designation path were not migrated correctly and the error message needs to be tuned to clarify the same. I checked and added the permission for “Designation” to the administrator to fix the issue and all is working fine now.

the above error is misleading as it shows something is wrong in the code base or the migration may have screwed something up, and as a result i actually went through the DB to confirm.

are you talking about assigning System Manager role to DocType Designation via Permission Manager?

_test/problematic_page failed

You can ignore these safely AFAIK. Website search rebuild attempts to load all pages for searching content of pages and fails at an internal test page.

Hi @ankush ! The problem is that all users see that banner “You have unseen Error Log” frequently, this is really annoying for them.

How can we suppress that message?

We removed this a while ago. Shouldn’t be a problem anymore. (on latest version)

2 Likes

Thank you @ankush ! Could you please send a link to the pull request? As we use an older version of frappe, we need to analyze the gap between latest version and our version.