Created the first blog as per the documentation shared. Using frappecloud instance. After creating the blog and publishing the same. Clicked on view on website and untaught server exception is displayed.
Context information (for bug reports)
Output of bench version
(paste here)
Steps to reproduce the issue
Create a blog
Publish
Click ‘view on website’
Observed result
Traceback (most recent call last):
File "apps/frappe/frappe/website/serve.py", line 18, in get_response
response = renderer_instance.render()
File "apps/frappe/frappe/website/page_renderers/document_page.py", line 52, in render
html = self.get_html()
File "apps/frappe/frappe/website/utils.py", line 510, in cache_html_decorator
html = func(*args, *kwargs)
File "apps/frappe/frappe/website/page_renderers/document_page.py", line 63, in get_html
html = frappe.get_template(self.template_path).render(self.context)
File "env/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render
self.environment.handle_exception()
File "env/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File "apps/frappe/frappe/website/doctype/blog_post/templates/blog_post.html", line 1, in top-level template code
{% extends "templates/web.html" %}
File "apps/frappe/frappe/templates/web.html", line 1, in top-level template code
{% extends base_template_path %}
File "apps/frappe/frappe/templates/base.html", line 70, in top-level template code
{% block content %}
File "apps/frappe/frappe/templates/web.html", line 72, in block 'content'
{{ main_content() }}
File "env/lib/python3.10/site-packages/jinja2/sandbox.py", line 393, in call
return context.call(obj, args, kwargs)
File "env/lib/python3.10/site-packages/jinja2/runtime.py", line 777, in _invoke
rv = self._func(arguments)
File "apps/frappe/frappe/templates/web.html", line 15, in template
{% block page_container %}
File "apps/frappe/frappe/templates/web.html", line 30, in block 'page_container'
{%- block page_content -%}{%- endblock -%}
File "apps/frappe/frappe/website/doctype/blog_post/templates/blog_post.html", line 65, in block 'page_content'
{% include "templates/includes/blog/blogger.html" %}
File "apps/frappe/frappe/templates/includes/blog/blogger.html", line 4, in top-level template code
{{ avatar(full_name=blogger_info.full_name, image=blogger_info.avatar, size='avatar-large') }}
File "env/lib/python3.10/site-packages/jinja2/sandbox.py", line 393, in call
return context.call(obj, args, kwargs)
File "env/lib/python3.10/site-packages/jinja2/runtime.py", line 777, in _invoke
rv = self._func(arguments)
File "apps/frappe/frappe/templates/includes/avatar_macro.html", line 2, in template
{% set user_info = frappe.utils.get_user_info_for_avatar(user_id) %}
File "env/lib/python3.10/site-packages/jinja2/sandbox.py", line 393, in call
return context.call(obj, args, **kwargs)
File "apps/frappe/frappe/utils/data.py", line 2069, in get_user_info_for_avatar
return {"email": user.email, "image": user.user_image, "name": user.full_name}
AttributeError: 'User' object has no attribute 'email'
Expected result
Stacktrace / full error message
Traceback (most recent call last):
File "apps/frappe/frappe/website/serve.py", line 18, in get_response
response = renderer_instance.render()
File "apps/frappe/frappe/website/page_renderers/document_page.py", line 52, in render
html = self.get_html()
File "apps/frappe/frappe/website/utils.py", line 510, in cache_html_decorator
html = func(*args, **kwargs)
File "apps/frappe/frappe/website/page_renderers/document_page.py", line 63, in get_html
html = frappe.get_template(self.template_path).render(self.context)
File "env/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render
self.environment.handle_exception()
File "env/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File "apps/frappe/frappe/website/doctype/blog_post/templates/blog_post.html", line 1, in top-level template code
{% extends "templates/web.html" %}
File "apps/frappe/frappe/templates/web.html", line 1, in top-level template code
{% extends base_template_path %}
File "apps/frappe/frappe/templates/base.html", line 70, in top-level template code
{% block content %}
File "apps/frappe/frappe/templates/web.html", line 72, in block 'content'
{{ main_content() }}
File "env/lib/python3.10/site-packages/jinja2/sandbox.py", line 393, in call
return __context.call(__obj, *args, **kwargs)
File "env/lib/python3.10/site-packages/jinja2/runtime.py", line 777, in _invoke
rv = self._func(*arguments)
File "apps/frappe/frappe/templates/web.html", line 15, in template
{% block page_container %}
File "apps/frappe/frappe/templates/web.html", line 30, in block 'page_container'
{%- block page_content -%}{%- endblock -%}
File "apps/frappe/frappe/website/doctype/blog_post/templates/blog_post.html", line 65, in block 'page_content'
{% include "templates/includes/blog/blogger.html" %}
File "apps/frappe/frappe/templates/includes/blog/blogger.html", line 4, in top-level template code
{{ avatar(full_name=blogger_info.full_name, image=blogger_info.avatar, size='avatar-large') }}
File "env/lib/python3.10/site-packages/jinja2/sandbox.py", line 393, in call
return __context.call(__obj, *args, **kwargs)
File "env/lib/python3.10/site-packages/jinja2/runtime.py", line 777, in _invoke
rv = self._func(*arguments)
File "apps/frappe/frappe/templates/includes/avatar_macro.html", line 2, in template
{% set user_info = frappe.utils.get_user_info_for_avatar(user_id) %}
File "env/lib/python3.10/site-packages/jinja2/sandbox.py", line 393, in call
return __context.call(__obj, *args, **kwargs)
File "apps/frappe/frappe/utils/data.py", line 2069, in get_user_info_for_avatar
return {"email": user.email, "image": user.user_image, "name": user.full_name}
AttributeError: 'User' object has no attribute 'email'
(paste here)
Additional information
OS version / distribution, Frappe install method, etc.
Not sure.. using frappecloud version 14 and I have installed all updated as of today.
Description of the issue
Created the first blog as per the documentation shared. Using frappecloud instance. After creating the blog and publishing the same. Clicked on view on website and untaught server exception is displayed.
Context information (for bug reports)
Output of
bench version
Steps to reproduce the issue
Observed result
Traceback (most recent call last): File "apps/frappe/frappe/website/serve.py", line 18, in get_response response = renderer_instance.render() File "apps/frappe/frappe/website/page_renderers/document_page.py", line 52, in render html = self.get_html() File "apps/frappe/frappe/website/utils.py", line 510, in cache_html_decorator html = func(*args, *kwargs) File "apps/frappe/frappe/website/page_renderers/document_page.py", line 63, in get_html html = frappe.get_template(self.template_path).render(self.context) File "env/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render self.environment.handle_exception() File "env/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception raise rewrite_traceback_stack(source=source) File "apps/frappe/frappe/website/doctype/blog_post/templates/blog_post.html", line 1, in top-level template code {% extends "templates/web.html" %} File "apps/frappe/frappe/templates/web.html", line 1, in top-level template code {% extends base_template_path %} File "apps/frappe/frappe/templates/base.html", line 70, in top-level template code {% block content %} File "apps/frappe/frappe/templates/web.html", line 72, in block 'content' {{ main_content() }} File "env/lib/python3.10/site-packages/jinja2/sandbox.py", line 393, in call return context.call(obj, args, kwargs) File "env/lib/python3.10/site-packages/jinja2/runtime.py", line 777, in _invoke rv = self._func(arguments) File "apps/frappe/frappe/templates/web.html", line 15, in template {% block page_container %} File "apps/frappe/frappe/templates/web.html", line 30, in block 'page_container' {%- block page_content -%}{%- endblock -%} File "apps/frappe/frappe/website/doctype/blog_post/templates/blog_post.html", line 65, in block 'page_content' {% include "templates/includes/blog/blogger.html" %} File "apps/frappe/frappe/templates/includes/blog/blogger.html", line 4, in top-level template code {{ avatar(full_name=blogger_info.full_name, image=blogger_info.avatar, size='avatar-large') }} File "env/lib/python3.10/site-packages/jinja2/sandbox.py", line 393, in call return context.call(obj, args, kwargs) File "env/lib/python3.10/site-packages/jinja2/runtime.py", line 777, in _invoke rv = self._func(arguments) File "apps/frappe/frappe/templates/includes/avatar_macro.html", line 2, in template {% set user_info = frappe.utils.get_user_info_for_avatar(user_id) %} File "env/lib/python3.10/site-packages/jinja2/sandbox.py", line 393, in call return context.call(obj, args, **kwargs) File "apps/frappe/frappe/utils/data.py", line 2069, in get_user_info_for_avatar return {"email": user.email, "image": user.user_image, "name": user.full_name} AttributeError: 'User' object has no attribute 'email'
Expected result
Stacktrace / full error message
Additional information
OS version / distribution,
Frappe
install method, etc. Not sure.. using frappecloud version 14 and I have installed all updated as of today.