-
Notifications
You must be signed in to change notification settings - Fork 104
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
Comments
This error occurs because, in newer versions of CKAN, Can check fork: mjanez@7c121ca Solution: Apply the PatchThe fix is to update the templates to use diff --git a/ckanext/pages/theme/templates_group/group/read_base.html b/ckanext/pages/theme/templates_group/group/read_base.html
index bbdae8f..6bf00fa 100644
--- a/ckanext/pages/theme/templates_group/group/read_base.html
+++ b/ckanext/pages/theme/templates_group/group/read_base.html
@@ -3,8 +3,8 @@
{% block content_primary_nav %}
{{ super() }}
{% if h.ckan_version().split('.')[1] | int >= 9 %}
- {{ h.build_nav_icon('pages.group_pages_index', _('Pages'), id=c.group_dict.name, icon='file') }}
+ {{ h.build_nav_icon('pages.group_pages_index', _('Pages'), id=group_dict.name, icon='file') }}
{% else %}
- {{ h.build_nav_icon('group_pages_index', _('Pages'), id=c.group_dict.name, icon='file') }}
+ {{ h.build_nav_icon('group_pages_index', _('Pages'), id=group_dict.name, icon='file') }}
{% endif %}
{% endblock %}
diff --git a/ckanext/pages/theme/templates_main/ckanext_pages/confirm_delete.html b/ckanext/pages/theme/templates_main/ckanext_pages/confirm_delete.html
index 6ab5f92..c00e1d6 100644
--- a/ckanext/pages/theme/templates_main/ckanext_pages/confirm_delete.html
+++ b/ckanext/pages/theme/templates_main/ckanext_pages/confirm_delete.html
@@ -10,7 +10,7 @@
{% block form %}
<p>{{ _('Are you sure you want to delete page - {name}?').format(name=c.page_dict.name) }}</p>
<p class="form-actions">
- {% set action = form_action or h.url_for('organization_pages_delete', id=c.group_dict.name, page='/' + page) %}
+ {% set action = form_action or h.url_for('organization_pages_delete', id=group_dict.name, page='/' + page) %}
<form action="{{ action }}" method="post">
<button class="btn" type="submit" name="cancel" >{{ _('Cancel') }}</button>
<button class="btn btn-primary" type="submit" name="delete" >{{ _('Confirm Delete') }}</button>
diff --git a/ckanext/pages/theme/templates_organization/organization/read_base.html b/ckanext/pages/theme/templates_organization/organization/read_base.html
index e5f3b47..eb2f39b 100644
--- a/ckanext/pages/theme/templates_organization/organization/read_base.html
+++ b/ckanext/pages/theme/templates_organization/organization/read_base.html
@@ -3,8 +3,8 @@
{% block content_primary_nav %}
{{ super() }}
{% if h.ckan_version().split('.')[1] | int >= 9 %}
- {{ h.build_nav_icon('pages.organization_pages_index', _('Pages'), id=c.group_dict.name, icon='file') }}
+ {{ h.build_nav_icon('pages.organization_pages_index', _('Pages'), id=group_dict.name, icon='file') }}
{% else %}
- {{ h.build_nav_icon('organization_pages_index', _('Pages'), id=c.group_dict.name, icon='file') }}
+ {{ h.build_nav_icon('organization_pages_index', _('Pages'), id=group_dict.name, icon='file') }}
{% endif %}
{% endblock %}
Steps to Apply the Patch
Expected OutcomeWith this patch applied, |
I confirm this fix made it ! |
ckan 2.11
pages install
pip install -e 'git+https://github.com/ckan/ckanext-pages.git#egg=ckanext-pages
ckan db upgrade -p pages
completedwith
ckanext.pages.organization = True
using activity plugin, the activity tab crashes - Error in Log file
to reproduce
ckanext.pages.organization = True
/en/organization/activity/orgname?offset=0
)ckanext.pages.organization = False
Error log
Screen shot - page crashed during render
(site logo is mostly white text with transparent background - explains the odd symbol on the left)
The text was updated successfully, but these errors were encountered: