vrk-kpa / ckanext-matomo

GNU Affero General Public License v3.0
3 stars 3 forks source link

Helper 'check_ckan_version' has not been defined #34

Closed 4estone closed 1 year ago

4estone commented 1 year ago

I get this error when running my skan instance with matomo extension Ckan version : 2.9.3

File "/usr/lib/ckan/default/src/ckanext-matomo/ckanext/matomo/plugin/../templates/base.html", line 10, in block "scripts" Jun 07 09:48:52 T-ODATA-1 uwsgi[4312]: {% block matomo_event_tracking %} Jun 07 09:48:52 T-ODATA-1 uwsgi[4312]: File "/usr/lib/ckan/default/src/ckanext-matomo/ckanext/matomo/plugin/../templates/base.html", line 11, in block "matomo_event_tracking" Jun 07 09:48:52 T-ODATA-1 uwsgi[4312]: {% set type = 'asset' if h.check_ckan_version(min_version="2.9.0", max_version="3.0.0") else 'resource' %} Jun 07 09:48:52 T-ODATA-1 uwsgi[4312]: File "/usr/lib/ckan/default/lib64/python3.6/site-packages/jinja2/environment.py", line 434, in getattr Jun 07 09:48:52 T-ODATA-1 uwsgi[4312]: return obj[attribute] Jun 07 09:48:52 T-ODATA-1 uwsgi[4312]: File "/usr/lib/ckan/default/src/ckan/ckan/lib/helpers.py", line 101, in getitem Jun 07 09:48:52 T-ODATA-1 uwsgi[4312]: key=key Jun 07 09:48:52 T-ODATA-1 uwsgi[4312]: ckan.exceptions.HelperError: Helper 'check_ckan_version' has not been defined.

Zharktas commented 1 year ago

You should update your ckan, the helper is available in ckan 2.9.6 https://github.com/ckan/ckan/pull/6741