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

2.11 ckanext.pages.organization=true crashes activity tab #136

Open
brooks-eco opened this issue Sep 21, 2024 · 0 comments
Open

2.11 ckanext.pages.organization=true crashes activity tab #136

brooks-eco opened this issue Sep 21, 2024 · 0 comments

Comments

@brooks-eco
Copy link

brooks-eco commented Sep 21, 2024

ckan 2.11
pages install pip install -e 'git+https://github.com/ckan/ckanext-pages.git#egg=ckanext-pages
ckan db upgrade -p pages completed

with ckanext.pages.organization = True
using activity plugin, the activity tab crashes - Error in Log file

ERROR [ckan.config.middleware.flask_app] 'werkzeug.local.LocalProxy object' has no attribute 'group_dict'

to reproduce

  1. set option ckanext.pages.organization = True
  2. recycle server
  3. open organization ( new "pages tab" visible)
  4. click on "Activity" tab (/en/organization/activity/orgname?offset=0)
  5. page error during rendering (see screenshot)
  6. setting ckanext.pages.organization = False
  7. recycle server - Activity tab for organization is working again

Error log

2024-09-21 13:09:01,676 ERROR [ckan.config.middleware.flask_app] 'werkzeug.local.LocalProxy object' has no attribute 'group_dict'
Traceback (most recent call last):
File "/usr/lib/ckan/default/lib/python3.10/site-packages/flask/app.py", line 880, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/ckan/default/lib/python3.10/site-packages/flask/app.py", line 865, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckanext/activity/views.py", line 576, in group_activity
return tk.render(
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckan/lib/base.py", line 104, in render
return flask_render_template(template_name, **extra_vars)
File "/usr/lib/ckan/default/lib/python3.10/site-packages/flask/templating.py", line 150, in render_template
return _render(app, template, context)
File "/usr/lib/ckan/default/lib/python3.10/site-packages/flask/templating.py", line 131, in _render
rv = template.render(context)
File "/usr/lib/ckan/default/lib/python3.10/site-packages/jinja2/environment.py", line 1304, in render
self.environment.handle_exception()
File "/usr/lib/ckan/default/lib/python3.10/site-packages/jinja2/environment.py", line 939, in handle_exception
raise rewrite_traceback_stack(source=source)
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckanext/activity/templates/organization/activity_stream.html", line 1, in top-level template code
{% extends "organization/read_base.html" %}
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckanext/activity/templates/organization/read_base.html", line 1, in top-level template code
{% ckan_extends %}
File "/usr/lib/ckan/default/src/ckanext-pages/ckanext/pages/theme/templates_organization/organization/read_base.html", line 1, in top-level template code
{% ckan_extends %}
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckan/templates/organization/read_base.html", line 3, in top-level template code
{% set organization = group_dict %}
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckanext/activity/templates/page.html", line 1, in top-level template code
{% ckan_extends %}
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckanext/tracking/templates/page.html", line 1, in top-level template code
{% ckan_extends %}
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckanext/charts/templates/page.html", line 1, in top-level template code
{% ckan_extends %}
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckan/templates/page.html", line 1, in top-level template code
{% extends "base.html" %}
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckanext/activity/templates/base.html", line 1, in top-level template code
{% ckan_extends %}
File "/usr/lib/ckan/default/src/ckanext-scheming/ckanext/scheming/templates/base.html", line 1, in top-level template code
{% ckan_extends %}
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckanext/geoview/plugin/../templates/base.html", line 1, in top-level template code
{% ckan_extends %}
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckan/templates/base.html", line 107, in top-level template code
{%- block page %}{% endblock -%}
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckan/templates/page.html", line 19, in block 'page'
{%- block content %}
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckan/templates/page.html", line 22, in block 'content'
{% block main_content %}
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckan/templates/page.html", line 74, in block 'main_content'
{% block primary %}
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckan/templates/page.html", line 87, in block 'primary'
{% block primary_content %}
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckan/templates/page.html", line 89, in block 'primary_content'
{% block page_header %}
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckan/templates/page.html", line 97, in block 'page_header'
{% block content_primary_nav %}{% endblock %}
File "/usr/lib/ckan/default/lib/python3.10/site-packages/ckanext/activity/templates/organization/read_base.html", line 4, in block 'content_primary_nav'
{{ super() }}
File "/usr/lib/ckan/default/src/ckanext-pages/ckanext/pages/theme/templates_organization/organization/read_base.html", line 6, in block 'content_primary_nav'
{{ h.build_nav_icon('pages.organization_pages_index', _('Pages'), id=c.group_dict.name, icon='file') }}
File "/usr/lib/ckan/default/lib/python3.10/site-packages/jinja2/environment.py", line 487, in getattr
return getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'werkzeug.local.LocalProxy object' has no attribute 'group_dict'

Screen shot - page crashed during render
(site logo is mostly white text with transparent background - explains the odd symbol on the left)

image

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

1 participant